mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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:
parent
63fac3343b
commit
789f6b8ac3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user