summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>2020-05-20 18:32:28 +0200
committerMarcel Holtmann <marcel@holtmann.org>2020-05-20 19:12:43 +0200
commit85e90d9391f57436b6f7f00503de370a657420ba (patch)
treecce9b01eeb3a2ea2ecd874d143ed6a4466ef4cde /drivers
parentBluetooth: Fix assuming EIR flags can result in SSP authentication (diff)
downloadlinux-85e90d9391f57436b6f7f00503de370a657420ba.tar.xz
linux-85e90d9391f57436b6f7f00503de370a657420ba.zip
Bluetooth: hci_qca: Fix uninitialized access to hdev
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> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/hci_qca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 26efe822f6e5..e4a68238fcb9 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;
}