summaryrefslogtreecommitdiffstats
path: root/net/llc/af_llc.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-08-13 04:50:43 +0200
committerDavid S. Miller <davem@davemloft.net>2012-08-15 01:51:40 +0200
commitf4f8720febf0d785a054fc09bde5e3ad09728a58 (patch)
treef0f23afc9145ee25773ed9c8bffa0a706a46216a /net/llc/af_llc.c
parentllc2: Fix silent failure of llc_station_init() (diff)
downloadlinux-f4f8720febf0d785a054fc09bde5e3ad09728a58.tar.xz
linux-f4f8720febf0d785a054fc09bde5e3ad09728a58.zip
llc2: Call llc_station_exit() on llc2_init() failure path
Otherwise the station packet handler will remain registered even though the module is unloaded. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r--net/llc/af_llc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index f6fe4d400502..8c2919ca36f6 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -1206,7 +1206,7 @@ static int __init llc2_init(void)
rc = llc_proc_init();
if (rc != 0) {
printk(llc_proc_err_msg);
- goto out_unregister_llc_proto;
+ goto out_station;
}
rc = llc_sysctl_init();
if (rc) {
@@ -1226,7 +1226,8 @@ out_sysctl:
llc_sysctl_exit();
out_proc:
llc_proc_exit();
-out_unregister_llc_proto:
+out_station:
+ llc_station_exit();
proto_unregister(&llc_proto);
goto out;
}