Skip to contentSkip to conversation

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

PATCH Applied Sayooj K Karun 2 participants 2 messages Nov 19, 2025 – Nov 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 881c7f259..c4edc1111 100644
@@ -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
#1 lore raw
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(), 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.

[...]

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