linux/drivers/bluetooth/btbcm.c
Charles Han df2f2d9199 Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name()
[ Upstream commit b88655bc65 ]

devm_kstrdup() can return a NULL pointer on failure,but this
returned value in btbcm_get_board_name() is not checked.
Add NULL check in btbcm_get_board_name(), to handle kernel NULL
pointer dereference error.

Fixes: f9183eaad9 ("Bluetooth: btbcm: Use devm_kstrdup()")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:57:22 +01:00

781 lines
19 KiB