]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
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 ec0bc3f60f2eea4216471746fdbea09c51b3fbcb..fca62dcd7f1bf2efae0b21edc7ce35cf192503ab 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;
        }