Bluetooth: Add Advertising Packet Configuration
[platform/kernel/linux-starfive.git] / net / bluetooth / af_bluetooth.c
index dc65974..1c3c7ff 100644 (file)
@@ -737,7 +737,7 @@ static int __init bt_init(void)
 
        err = bt_sysfs_init();
        if (err < 0)
-               return err;
+               goto cleanup_led;
 
        err = sock_register(&bt_sock_family_ops);
        if (err)
@@ -773,6 +773,8 @@ unregister_socket:
        sock_unregister(PF_BLUETOOTH);
 cleanup_sysfs:
        bt_sysfs_cleanup();
+cleanup_led:
+       bt_leds_cleanup();
        return err;
 }