bluetooth: unlock if allocation fails in hci_blacklist_add()
Subsystems (3)
PATCH 1/1 bluetooth: unlock if allocation fails in hci_blacklist_add()
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 <[email protected]>
net/bluetooth/hci_core.c +1 -1
@@ -1326,7 +1326,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; }
Re: [patch] bluetooth: unlock if allocation fails in
Hi Dan,
Quoted 10 lines · Dan Carpenter
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 <[email protected]>net/bluetooth/hci_core.c +0
-0
net/bluetooth/hci_core.c int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr) · line 1331
Quoted 7 lines
net/bluetooth/hci_core.c +1
-1@@ -1326,7 +1326,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; }
Patch has been applied, thanks.
Gustavo