summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2022-03-23 00:30:40 +0100
committerMarcel Holtmann <marcel@holtmann.org>2022-05-13 13:05:48 +0200
commit789f6b8ac3b15bca09b69d5699cad0bf6e2103aa (patch)
tree948d7ba136ea566fa88d71050d106ba90bc51200 /drivers/bluetooth
parentBluetooth: btbcm: Support per-board firmware variants (diff)
downloadlinux-789f6b8ac3b15bca09b69d5699cad0bf6e2103aa.tar.xz
linux-789f6b8ac3b15bca09b69d5699cad0bf6e2103aa.zip
Bluetooth: mt7921s: Fix the incorrect pointer check
Fix the incorrect pointer check on ven_data. Fixes: f41b91fa1783 ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data") Co-developed-by: Yake Yang <yake.yang@mediatek.com> Signed-off-by: Yake Yang <yake.yang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmtksdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index f3dc5881fff7..b6d77e04240c 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -961,7 +961,7 @@ static int btmtksdio_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;
}