mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
net: use rtnl_register_module where needed
all of these can be compiled as a module, so use new _module version to make sure module can no longer be removed while callback/dump is in use. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e420251148
commit
c1c502b511
8 changed files with 55 additions and 32 deletions
|
|
@ -1116,9 +1116,13 @@ static int __init qrtr_proto_init(void)
|
|||
return rc;
|
||||
}
|
||||
|
||||
rtnl_register(PF_QIPCRTR, RTM_NEWADDR, qrtr_addr_doit, NULL, 0);
|
||||
rc = rtnl_register_module(THIS_MODULE, PF_QIPCRTR, RTM_NEWADDR, qrtr_addr_doit, NULL, 0);
|
||||
if (rc) {
|
||||
sock_unregister(qrtr_family.family);
|
||||
proto_unregister(&qrtr_proto);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
postcore_initcall(qrtr_proto_init);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue