diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index b577e65a0c3ef29f8d68b0d9c0548cb7485cde8e..14a917e70f3ee83440e3ce7d2362a1fa04422449 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c @@ -741,7 +741,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) @@ -777,6 +777,8 @@ static int __init bt_init(void) sock_unregister(PF_BLUETOOTH); cleanup_sysfs: bt_sysfs_cleanup(); +cleanup_led: + bt_leds_cleanup(); return err; }