]> git.itanic.dy.fi Git - linux-stable/commit
Bluetooth: qca: fix NULL-deref on non-serdev setup
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 22 Apr 2024 13:57:48 +0000 (15:57 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 24 Apr 2024 20:26:19 +0000 (16:26 -0400)
commit7ddb9de6af0f1c71147785b12fd7c8ec3f06cc86
treefa0ce76a75c5cecb6ea6af24e46f820f5db560eb
parent73e87c0a49fda31d7b589edccf4c72e924411371
Bluetooth: qca: fix NULL-deref on non-serdev setup

Qualcomm ROME controllers can be registered from the Bluetooth line
discipline and in this case the HCI UART serdev pointer is NULL.

Add the missing sanity check to prevent a NULL-pointer dereference when
setup() is called for a non-serdev controller.

Fixes: e9b3e5b8c657 ("Bluetooth: hci_qca: only assign wakeup with serial port support")
Cc: stable@vger.kernel.org # 6.2
Cc: Zhengping Jiang <jiangzp@google.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/hci_qca.c