提交 f4f8720f 编写于 作者: B Ben Hutchings 提交者: David S. Miller

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: NBen Hutchings <ben@decadent.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6024935f
......@@ -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 @@ static int __init llc2_init(void)
llc_sysctl_exit();
out_proc:
llc_proc_exit();
out_unregister_llc_proto:
out_station:
llc_station_exit();
proto_unregister(&llc_proto);
goto out;
}
......
......@@ -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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册