]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Bluetooth: mt7921s: Fix the incorrect pointer check
authorSean Wang <sean.wang@mediatek.com>
Tue, 22 Mar 2022 23:30:40 +0000 (07:30 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 13 May 2022 11:05:48 +0000 (13:05 +0200)
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>
drivers/bluetooth/btmtksdio.c

index f3dc5881fff704811aca51d1c59ed2ba1ff5c074..b6d77e04240cadb46df5e4b769034b6a33e516a7 100644 (file)
@@ -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;
        }