Bluetooth: unlock if allocation fails in hci_blacklist_add()
authorDan Carpenter <error27@gmail.com>
Wed, 3 Aug 2011 14:22:45 +0000 (17:22 +0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Thu, 11 Aug 2011 22:50:25 +0000 (19:50 -0300)
There was a small typo here so we never actually hit the goto which
would call hci_dev_unlock_bh().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hci_core.c

index ec0bc3f..fca62dc 100644 (file)
@@ -1327,7 +1327,7 @@ int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr)
 
        entry = kzalloc(sizeof(struct bdaddr_list), GFP_KERNEL);
        if (!entry) {
-               return -ENOMEM;
+               err = -ENOMEM;
                goto err;
        }