]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: hci_qca: fix NULL pointer dereference in qca_setup() for non-serdev device
authorZijun Hu <zijun.hu@oss.qualcomm.com>
Mon, 1 Jun 2026 11:30:55 +0000 (04:30 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 11 Jun 2026 18:24:39 +0000 (14:24 -0400)
commit3ec629fee178d429f01ae843e4ea888de93012bf
tree2954567b5e6a24db85fa20ba8da03b6e3b203599
parent88b4d528eda4ac71c2952b3458f2abbc80a91cd2
Bluetooth: hci_qca: fix NULL pointer dereference in qca_setup() for non-serdev device

hu->serdev is NULL for hci_uart attached via non-serdev paths, but
qca_setup() unconditionally calls serdev_device_get_drvdata(hu->serdev)
and dereferences the result, causing a NULL pointer dereference.

Fix by guarding the dereference with a NULL check, consistent with the
rest of qca_setup().

Fixes: 22d893eec0d5 ("Bluetooth: hci_qca: Refactor HFP hardware offload capability handling")
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/hci_qca.c