Bluetooth: Remove unnecessary variable initialization
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 20 Apr 2009 05:09:16 +0000 (07:09 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Jun 2009 12:50:00 +0000 (14:50 +0200)
The initial value of err is not used until it is set to -ENOMEM. So just
remove the initialization completely.

Based on a patch from Gustavo F. Padovan <gustavo@las.ic.unicamp.br>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c

index c0c0915..77e6715 100644 (file)
@@ -844,7 +844,7 @@ static int l2cap_do_connect(struct sock *sk)
        struct hci_conn *hcon;
        struct hci_dev *hdev;
        __u8 auth_type;
-       int err = 0;
+       int err;
 
        BT_DBG("%s -> %s psm 0x%2.2x", batostr(src), batostr(dst),
                                                        l2cap_pi(sk)->psm);