Commit 85e90d93 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Marcel Holtmann

Bluetooth: hci_qca: Fix uninitialized access to hdev

hdev is always allocated and not only when power control is required.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 755dfcbc
...@@ -1947,8 +1947,9 @@ static int qca_serdev_probe(struct serdev_device *serdev) ...@@ -1947,8 +1947,9 @@ static int qca_serdev_probe(struct serdev_device *serdev)
} }
} }
if (power_ctrl_enabled) {
hdev = qcadev->serdev_hu.hdev; hdev = qcadev->serdev_hu.hdev;
if (power_ctrl_enabled) {
set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks); set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
hdev->shutdown = qca_power_off; hdev->shutdown = qca_power_off;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment