All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: mt7921s: fix a NULL check
@ 2022-03-23  7:48 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2022-03-23  7:48 UTC (permalink / raw)
  To: Marcel Holtmann, Yake Yang
  Cc: Johan Hedberg, Luiz Augusto von Dentz, Matthias Brugger,
	Sean Wang, Mark Chen, linux-bluetooth, linux-mediatek,
	kernel-janitors

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(-)

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.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-23 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23  7:48 [PATCH] Bluetooth: mt7921s: fix a NULL check Dan Carpenter
2022-03-23  7:48 ` Dan Carpenter
2022-03-23  7:57 ` 回复: " Yake Yang (杨亚克)
2022-03-23  8:49   ` bluez.test.bot
2022-03-23  8:49 ` bluez.test.bot
2022-03-23  9:18   ` Dan Carpenter
2022-03-23 10:50 ` [PATCH] " patchwork-bot+bluetooth
2022-03-23 10:50   ` patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.