Bluetooth: btrtl: check for NULL in btrtl_setup_realtek()
authorMax Chou <max.chou@realtek.com>
Tue, 31 Dec 2024 06:57:19 +0000 (14:57 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 15 Jan 2025 15:34:41 +0000 (10:34 -0500)
commit3c15082f3567032d196e8760753373332508c2ca
tree2da1b94a0af76b3d657cfa61f73e9f7d88d34224
parentb88655bc6593c6a7fdc1248b212d17e581c4334e
Bluetooth: btrtl: check for NULL in btrtl_setup_realtek()

If insert an USB dongle which chip is not maintained in ic_id_table, it
will hit the NULL point accessed. Add a null point check to avoid the
Kernel Oops.

Fixes: b39910bb54d9 ("Bluetooth: Populate hci_set_hw_info for Intel and Realtek")
Reviewed-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btrtl.c