aboutsummaryrefslogtreecommitdiff
path: root/net/qrtr/qrtr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-25 11:12:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-25 11:12:29 +0100
commit072a51be8ecfb84e15b27b7f80a601560f386788 (patch)
treecd7bee45536733a987e70037b109eb1bd9a4cc36 /net/qrtr/qrtr.c
parent3ac6e56c325e4660837efcf995e8460d917b4778 (diff)
parent6ee1d745b7c9fd573fba142a2efdad76a9f1cb04 (diff)
Merge 5.11-rc5 into driver-core-next
We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/qrtr/qrtr.c')
-rw-r--r--net/qrtr/qrtr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index f4ab3ca6d73b..b34358282f37 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -1287,13 +1287,19 @@ static int __init qrtr_proto_init(void)
return rc;
rc = sock_register(&qrtr_family);
- if (rc) {
- proto_unregister(&qrtr_proto);
- return rc;
- }
+ if (rc)
+ goto err_proto;
- qrtr_ns_init();
+ rc = qrtr_ns_init();
+ if (rc)
+ goto err_sock;
+ return 0;
+
+err_sock:
+ sock_unregister(qrtr_family.family);
+err_proto:
+ proto_unregister(&qrtr_proto);
return rc;
}
postcore_initcall(qrtr_proto_init);