]> git.baikalelectronics.ru Git - kernel.git/commit
rsi: fix potential null dereference in rsi_probe()
authorDenis Efremov <efremov@linux.com>
Wed, 2 Oct 2019 17:18:11 +0000 (20:18 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 4 Oct 2019 13:46:43 +0000 (16:46 +0300)
commitf90d61fc5c23362dbf39990e533b6f4d46890b66
tree16cf847d8ebbe6e6e35e34e191e42b7a91107704
parentc9904619f016e0e660c32dcfc84b56b5b0a3262c
rsi: fix potential null dereference in rsi_probe()

The id pointer can be NULL in rsi_probe(). It is checked everywhere except
for the else branch in the idProduct condition. The patch adds NULL check
before the id dereference in the rsi_dbg() call.

Fixes: 9d2c887a4646 ("rsi: add new device model for 9116")
Cc: Amitkumar Karwar <amitkarwar@gmail.com>
Cc: Siva Rebbagondla <siva8118@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_usb.c