* [PATCH] Bluetooth: mt7921s: Fix a wrong judgment in btmtksdio_get_codec_config_data()
@ 2022-03-22 2:36 Yu Liao
2022-03-22 22:57 ` Miles Chen
0 siblings, 1 reply; 2+ messages in thread
From: Yu Liao @ 2022-03-22 2:36 UTC (permalink / raw)
To: yake.yang, marcel, linux-kernel; +Cc: liaoyu15, liwei391
Since ven_data is a double pointer, it should be *ven_data here.
Fixes: f41b91fa1783 ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data")
Signed-off-by: Yu Liao <liaoyu15@huawei.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.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: mt7921s: Fix a wrong judgment in btmtksdio_get_codec_config_data()
2022-03-22 2:36 [PATCH] Bluetooth: mt7921s: Fix a wrong judgment in btmtksdio_get_codec_config_data() Yu Liao
@ 2022-03-22 22:57 ` Miles Chen
0 siblings, 0 replies; 2+ messages in thread
From: Miles Chen @ 2022-03-22 22:57 UTC (permalink / raw)
To: liaoyu15; +Cc: linux-kernel, liwei391, marcel, yake.yang
Hi Yu,
>Since ven_data is a double pointer, it should be *ven_data here.
>
>Fixes: f41b91fa1783 ("Bluetooth: mt7921s: Add .btmtk_get_codec_config_data")
>Signed-off-by: Yu Liao <liaoyu15@huawei.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;
> }
Thanks for fixing this.
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-22 22:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 2:36 [PATCH] Bluetooth: mt7921s: Fix a wrong judgment in btmtksdio_get_codec_config_data() Yu Liao
2022-03-22 22:57 ` Miles Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®