Bluetooth: remove unnecessary call to hci_sock_cleanup
authorAnand Gadiyar <gadiyar@ti.com>
Tue, 22 Feb 2011 07:13:26 +0000 (12:43 +0530)
committerGustavo F. Padovan <padovan@profusion.mobi>
Sat, 26 Feb 2011 01:36:58 +0000 (22:36 -0300)
hci_sock_cleanup is already called after the sock_err label.
It appears that we can drop this call.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/af_bluetooth.c

index 88af9eb9aa48b0239463f155adee871047984fe2..8add9b4999129bcbdf62122221bd4bfec0c686ac 100644 (file)
@@ -550,10 +550,8 @@ static int __init bt_init(void)
                goto error;
 
        err = l2cap_init();
-       if (err < 0) {
-               hci_sock_cleanup();
+       if (err < 0)
                goto sock_err;
-       }
 
        err = sco_init();
        if (err < 0) {