* [PATCH] Bluetooth: hci_qca: Fix uninitialized access to hdev
@ 2020-05-20 16:32 Abhishek Pandit-Subedi
2020-05-20 17:13 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Abhishek Pandit-Subedi @ 2020-05-20 16:32 UTC (permalink / raw)
To: dan.carpenter, marcel, linux-bluetooth
Cc: Abhishek Pandit-Subedi, Johan Hedberg, linux-kernel
hdev is always allocated and not only when power control is required.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---
drivers/bluetooth/hci_qca.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 26efe822f6e58..e4a68238fcb93 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1947,8 +1947,9 @@ static int qca_serdev_probe(struct serdev_device *serdev)
}
}
+ hdev = qcadev->serdev_hu.hdev;
+
if (power_ctrl_enabled) {
- hdev = qcadev->serdev_hu.hdev;
set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
hdev->shutdown = qca_power_off;
}
--
2.27.0.rc0.183.gde8f92d652-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: hci_qca: Fix uninitialized access to hdev
2020-05-20 16:32 [PATCH] Bluetooth: hci_qca: Fix uninitialized access to hdev Abhishek Pandit-Subedi
@ 2020-05-20 17:13 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-05-20 17:13 UTC (permalink / raw)
To: Abhishek Pandit-Subedi; +Cc: Dan Carpenter, BlueZ, Johan Hedberg, linux-kernel
Hi Abhishek,
> hdev is always allocated and not only when power control is required.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
>
> drivers/bluetooth/hci_qca.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-20 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 16:32 [PATCH] Bluetooth: hci_qca: Fix uninitialized access to hdev Abhishek Pandit-Subedi
2020-05-20 17:13 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).