Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btrtl: check for NULL in btrtl_set_quirks()

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>

authored by

Max Chou and committed by
Luiz Augusto von Dentz
253cf30e 069f5342

+3
+3
drivers/bluetooth/btrtl.c
··· 905 905 break; 906 906 } 907 907 908 + if (!btrtl_dev->ic_info) 909 + return; 910 + 908 911 switch (btrtl_dev->ic_info->lmp_subver) { 909 912 case RTL_ROM_LMP_8703B: 910 913 /* 8723CS reports two pages for local ext features,