Commit f170d44b authored by Denis Efremov's avatar Denis Efremov Committed by Kalle Valo
Browse files

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: 54fdb318 ("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: default avatarDenis Efremov <efremov@linux.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 60b5b49f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ static int rsi_probe(struct usb_interface *pfunction,
		adapter->device_model = RSI_DEV_9116;
	} else {
		rsi_dbg(ERR_ZONE, "%s: Unsupported RSI device id 0x%x\n",
			__func__, id->idProduct);
			__func__, id ? id->idProduct : 0x0);
		goto err1;
	}