rsi: fix potential null dereference in rsi_probe()
authorDenis Efremov <efremov@linux.com>
Wed, 2 Oct 2019 17:18:11 +0000 (20:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:49 +0000 (19:48 +0100)
commit5412a6fb110de9eb8d80acf1e1dbc911dad78fa3
tree5cbc54f1f8b258f6dc41444013de5d394cb659a9
parent1283ae6333ad45fe04c78d3e3f514504c7587c7d
rsi: fix potential null dereference in rsi_probe()

commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0 upstream.

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: 54fdb318c111 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rsi/rsi_91x_usb.c