net: atm: fix incorrect cleanup function call in error path
Subsystems (3)
PATCH 1/1 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.
--- net/atm/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/atm/common.c +1 -1
@@ -881,7 +881,7 @@ static int __init atm_init(void) out_atmsvc_exit:atmsvc_exit (); out_atmpvc_exit: -atmsvc_exit (); +atmpvc_exit (); out_unregister_vcc_proto:proto_unregister (&vcc_proto); goto out;
Signature · 1 line
2.43.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 19 Nov 2025 14:27:47 +0530 you wrote:
In
atm_init(), ifatmsvc_init()fails, the code jumps toout_atmpvc_exitlabel which incorrectly callsatmsvc_exit()instead ofatmpvc_exit(). This results in calling the wrong cleanup function and failing to properly clean upatmpvc_init().Fix this by calling
atmpvc_exit()in theout_atmpvc_exiterror path.[...]
Here is the summary with links:
- net: atm: fix incorrect cleanup function call in error path
https://git.kernel.org/netdev/net/c/4b4749b7b4b3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html