Bluetooth: change bt_sock_unregister() to return void
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / bluetooth / af_bluetooth.c
index d3ee69b35a78267f35b8ea4a9b32d367160eea21..81598e588f7f3c67aa647e33f9d83285de2106cf 100644 (file)
@@ -92,23 +92,14 @@ int bt_sock_register(int proto, const struct net_proto_family *ops)
 }
 EXPORT_SYMBOL(bt_sock_register);
 
-int bt_sock_unregister(int proto)
+void bt_sock_unregister(int proto)
 {
-       int err = 0;
-
        if (proto < 0 || proto >= BT_MAX_PROTO)
-               return -EINVAL;
+               return;
 
        write_lock(&bt_proto_lock);
-
-       if (!bt_proto[proto])
-               err = -ENOENT;
-       else
-               bt_proto[proto] = NULL;
-
+       bt_proto[proto] = NULL;
        write_unlock(&bt_proto_lock);
-
-       return err;
 }
 EXPORT_SYMBOL(bt_sock_unregister);