diff mbox series

回复: [PATCH] Bluetooth: mt7921s: fix a NULL check

Message ID TYZPR03MB5278324850B998139A88B30482189@TYZPR03MB5278.apcprd03.prod.outlook.com
State New
Headers show
Series 回复: [PATCH] Bluetooth: mt7921s: fix a NULL check | expand

Commit Message

Yake Yang (杨亚克) March 23, 2022, 7:57 a.m. UTC
Hi Dan,
Thanks for fixing this issue, we will update patch.

-----邮件原件-----
发件人: Dan Carpenter <dan.carpenter@oracle.com> 
发送时间: 2022年3月23日 15:49
收件人: Marcel Holtmann <marcel@holtmann.org>; Yake Yang (杨亚克) <yake.yang@mediatek.com>
抄送: Johan Hedberg <johan.hedberg@gmail.com>; Luiz Augusto von Dentz <luiz.dentz@gmail.com>; Matthias Brugger <matthias.bgg@gmail.com>; Sean Wang <Sean.Wang@mediatek.com>; Mark Chen <markyawenchen@gmail.com>; linux-bluetooth@vger.kernel.org; linux-mediatek@lists.infradead.org; kernel-janitors@vger.kernel.org
主题: [PATCH] Bluetooth: mt7921s: fix a NULL check

There is a typo in the NULL check so it's never true.  It should be checking "*ven_data" instead of "ven_data".

Fixes: 3cabc5ca2c9d ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/bluetooth/btmtksdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1
diff mbox series

Patch

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;
 	}