diff mbox series

appletalk: Fix atalk_proc_init() return path

Message ID 086b426f44bc24360cc89476fe18d2758a2652af.1596344622.git.lukas@wunner.de
State Accepted
Delegated to: David Miller
Headers show
Series appletalk: Fix atalk_proc_init() return path | expand

Commit Message

Lukas Wunner Aug. 2, 2020, 5:06 a.m. UTC
From: Vincent Duvert <vincent.ldev@duvert.net>

Add a missing return statement to atalk_proc_init so it doesn't return
-ENOMEM when successful.  This allows the appletalk module to load
properly.

Fixes: e2bcd8b0ce6e ("appletalk: use remove_proc_subtree to simplify procfs code")
Link: https://www.downtowndougbrown.com/2020/08/hacking-up-a-fix-for-the-broken-appletalk-kernel-module-in-linux-5-1-and-newer/
Reported-by: Christopher KOBAYASHI <chris@disavowed.jp>
Reported-by: Doug Brown <doug@downtowndougbrown.com>
Signed-off-by: Vincent Duvert <vincent.ldev@duvert.net>
[lukas: add missing tags]
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: stable@vger.kernel.org # v5.1+
Cc: Yue Haibing <yuehaibing@huawei.com>
---
 net/appletalk/atalk_proc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Aug. 3, 2020, 10:49 p.m. UTC | #1
From: Lukas Wunner <lukas@wunner.de>
Date: Sun, 2 Aug 2020 07:06:51 +0200

> From: Vincent Duvert <vincent.ldev@duvert.net>
> 
> Add a missing return statement to atalk_proc_init so it doesn't return
> -ENOMEM when successful.  This allows the appletalk module to load
> properly.
> 
> Fixes: e2bcd8b0ce6e ("appletalk: use remove_proc_subtree to simplify procfs code")
> Link: https://www.downtowndougbrown.com/2020/08/hacking-up-a-fix-for-the-broken-appletalk-kernel-module-in-linux-5-1-and-newer/
> Reported-by: Christopher KOBAYASHI <chris@disavowed.jp>
> Reported-by: Doug Brown <doug@downtowndougbrown.com>
> Signed-off-by: Vincent Duvert <vincent.ldev@duvert.net>
> [lukas: add missing tags]
> Signed-off-by: Lukas Wunner <lukas@wunner.de>

Shows how many people are actually using appletalk if it doesn't even
load since v5.1

Applied.
diff mbox series

Patch

diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
index 550c6ca..9c12412 100644
--- a/net/appletalk/atalk_proc.c
+++ b/net/appletalk/atalk_proc.c
@@ -229,6 +229,8 @@  int __init atalk_proc_init(void)
 				     sizeof(struct aarp_iter_state), NULL))
 		goto out;
 
+	return 0;
+
 out:
 	remove_proc_subtree("atalk", init_net.proc_net);
 	return -ENOMEM;