diff options
Diffstat (limited to 'net/nfc/af_nfc.c')
-rw-r--r-- | net/nfc/af_nfc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/af_nfc.c b/net/nfc/af_nfc.c index 4a9e72073564..dda323e0a473 100644 --- a/net/nfc/af_nfc.c +++ b/net/nfc/af_nfc.c @@ -60,6 +60,9 @@ int nfc_proto_register(const struct nfc_protocol *nfc_proto) proto_tab[nfc_proto->id] = nfc_proto; write_unlock(&proto_tab_lock); + if (rc) + proto_unregister(nfc_proto->proto); + return rc; } EXPORT_SYMBOL(nfc_proto_register); @@ -79,7 +82,7 @@ int __init af_nfc_init(void) return sock_register(&nfc_sock_family_ops); } -void af_nfc_exit(void) +void __exit af_nfc_exit(void) { sock_unregister(PF_NFC); } |