]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
llc2: Call llc_station_exit() on llc2_init() failure path
authorBen Hutchings <ben@decadent.org.uk>
Mon, 13 Aug 2012 02:50:43 +0000 (02:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Aug 2012 23:51:40 +0000 (16:51 -0700)
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>
net/llc/af_llc.c
net/llc/llc_station.c

index f6fe4d400502df780e1f57e574e5b4a1574b7f8d..8c2919ca36f63c6751b612e3008fd8057aba9944 100644 (file)
@@ -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;
 }
index 45ddbb93c5d0b72c96b910547bb08791425e8850..bba5184fafd7966ec26fadd4a51163f07a62c0d7 100644 (file)
@@ -701,7 +701,7 @@ void __init llc_station_init(void)
        llc_main_station.state          = LLC_STATION_STATE_UP;
 }
 
-void __exit llc_station_exit(void)
+void llc_station_exit(void)
 {
        llc_set_station_handler(NULL);
 }