Bluetooth: mt7921s: Fix the incorrect pointer check

Fix the incorrect pointer check on ven_data.

Fixes: f41b91fa17 ("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>
This commit is contained in:
Sean Wang 2022-03-23 07:30:40 +08:00 committed by Marcel Holtmann
parent 63fac3343b
commit 789f6b8ac3

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