[PATCH] Bluetooth: mt7921s: Fix the incorrect pointer check
sean.wang at mediatek.com
sean.wang at mediatek.com
Tue Mar 22 16:30:40 PDT 2022
From: Sean Wang <sean.wang at mediatek.com>
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 at mediatek.com>
Signed-off-by: Yake Yang <yake.yang at mediatek.com>
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
---
drivers/bluetooth/btmtksdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.25.1
More information about the Linux-mediatek
mailing list