]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btrtl: check for NULL in btrtl_set_quirks()
authorMax Chou <max.chou@realtek.com>
Tue, 21 Mar 2023 11:48:26 +0000 (19:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:39 +0000 (17:32 +0100)
commit7cd27149d5e4833611856f2eebe2fdc23ee1f57f
treecea8b1d13892b279415c9ca2727a425fc6f351f0
parentb676ba83e0e48506c72332f5294bdb860f6c9c8d
Bluetooth: btrtl: check for NULL in btrtl_set_quirks()

[ Upstream commit 253cf30e8d3d001850a95c4729d668f916b037ab ]

The btrtl_set_quirks() has accessed btrtl_dev->ic_info->lmp_subver since
b8e482d02513. However, if installing a Realtek Bluetooth controller
without the driver supported, it will hit the NULL point accessed.

Add a check for NULL to avoid the Kernel Oops.

Signed-off-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btrtl.c