]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rsi: drop bogus device-id checks from probe
authorJohan Hovold <johan@kernel.org>
Fri, 4 Oct 2019 14:44:22 +0000 (16:44 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Oct 2019 08:23:46 +0000 (11:23 +0300)
USB core will never call a USB-driver probe function with a NULL
device-id pointer.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_usb.c

index 760eaffeebd64a100392f5d97da43ae303428520..53f41fc2cadfbce56fa3f4f2b74c3bddb73bebe8 100644 (file)
@@ -785,10 +785,10 @@ static int rsi_probe(struct usb_interface *pfunction,
 
        rsi_dbg(ERR_ZONE, "%s: Initialized os intf ops\n", __func__);
 
-       if (id && id->idProduct == RSI_USB_PID_9113) {
+       if (id->idProduct == RSI_USB_PID_9113) {
                rsi_dbg(INIT_ZONE, "%s: 9113 module detected\n", __func__);
                adapter->device_model = RSI_DEV_9113;
-       } else if (id && id->idProduct == RSI_USB_PID_9116) {
+       } else if (id->idProduct == RSI_USB_PID_9116) {
                rsi_dbg(INIT_ZONE, "%s: 9116 module detected\n", __func__);
                adapter->device_model = RSI_DEV_9116;
        } else {