2011-02-22 07:13:26

by Anand Gadiyar

[permalink] [raw]
Subject: [PATCH] bluetooth: remove unnecessary call to hci_sock_cleanup

hci_sock_cleanup is already called after the sock_err label.
It appears that we can drop this call.

Signed-off-by: Anand Gadiyar <[email protected]>
Cc: Gustavo F. Padovan <[email protected]>
---
net/bluetooth/af_bluetooth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-omap-usb/net/bluetooth/af_bluetooth.c
===================================================================
--- linux-omap-usb.orig/net/bluetooth/af_bluetooth.c
+++ linux-omap-usb/net/bluetooth/af_bluetooth.c
@@ -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) {


2011-02-22 12:26:41

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] bluetooth: remove unnecessary call to hci_sock_cleanup

Hi Anand,

* Anand Gadiyar <[email protected]> [2011-02-22 12:43:26 +0530]:

> hci_sock_cleanup is already called after the sock_err label.
> It appears that we can drop this call.
>
> Signed-off-by: Anand Gadiyar <[email protected]>
> Cc: Gustavo F. Padovan <[email protected]>
> ---
> net/bluetooth/af_bluetooth.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Also applied, thanks.

--
Gustavo F. Padovan
http://profusion.mobi