Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: atm: fix incorrect cleanup function call in error path

In atm_init(), if atmsvc_init() fails, the code jumps to out_atmpvc_exit
label which incorrectly calls atmsvc_exit() instead of atmpvc_exit().
This results in calling the wrong cleanup function and failing to properly
clean up atmpvc_init().

Fix this by calling atmpvc_exit() in the out_atmpvc_exit error path.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Link: https://patch.msgid.link/20251119085747.67139-1-sayooj@aerlync.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Sayooj K Karun and committed by
Jakub Kicinski
4b4749b7 8e621c9a

+1 -1
+1 -1
net/atm/common.c
··· 881 881 out_atmsvc_exit: 882 882 atmsvc_exit(); 883 883 out_atmpvc_exit: 884 - atmsvc_exit(); 884 + atmpvc_exit(); 885 885 out_unregister_vcc_proto: 886 886 proto_unregister(&vcc_proto); 887 887 goto out;