diff mbox series

Bluetooth: mt7921s: fix a NULL check

Message ID 20220323074830.GA4639@kili (mailing list archive)
State New, archived
Headers show
Series Bluetooth: mt7921s: fix a NULL check | expand

Commit Message

Dan Carpenter March 23, 2022, 7:48 a.m. UTC
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(-)

Comments

patchwork-bot+bluetooth@kernel.org March 23, 2022, 10:50 a.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Marcel Holtmann <marcel@holtmann.org>:

On Wed, 23 Mar 2022 10:48:30 +0300 you wrote:
> 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(-)

Here is the summary with links:
  - Bluetooth: mt7921s: fix a NULL check
    https://git.kernel.org/bluetooth/bluetooth-next/c/864cc8a234cd

You are awesome, thank you!
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;
 	}