summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-09-09 13:35:41 +0100
committerMarcel Holtmann <marcel@holtmann.org>2021-09-10 09:28:32 +0200
commit8bba13b1d08d42e2e8308924fa5c1551a7b2b011 (patch)
tree70331aba8e55794ca215f19b8c4648d73fafc8cd /drivers/bluetooth
parent5031ffcc79b81776ac8f7f8b1a585aed8818e3d1 (diff)
Bluetooth: btintel: Fix incorrect out of memory check
Currently *ven_data is being assigned the return from a kmalloc call but the out-of-memory check is checking ven_data and not *ven_data. Fix this by adding the missing dereference * operator, Addresses-Coverity: ("Dereference null return") Fixes: 70dd978952bc ("Bluetooth: btintel: Define a callback to fetch codec config data") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btintel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 115bb2d07a8d..9359bff47296 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2176,7 +2176,7 @@ static int btintel_get_codec_config_data(struct hci_dev *hdev,
}
*ven_data = kmalloc(sizeof(__u8), GFP_KERNEL);
- if (!ven_data) {
+ if (!*ven_data) {
err = -ENOMEM;
goto error;
}