OSDN Git Service

rsi: fix an error code in rsi_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 16 Aug 2021 18:39:47 +0000 (21:39 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 21 Aug 2021 17:27:48 +0000 (20:27 +0300)
Return -ENODEV instead of success for unsupported devices.

Fixes: 54fdb318c111 ("rsi: add new device model for 9116")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210816183947.GA2119@kili
drivers/net/wireless/rsi/rsi_91x_usb.c

index 3fbe2a3..416976f 100644 (file)
@@ -816,6 +816,7 @@ static int rsi_probe(struct usb_interface *pfunction,
        } else {
                rsi_dbg(ERR_ZONE, "%s: Unsupported RSI device id 0x%x\n",
                        __func__, id->idProduct);
+               status = -ENODEV;
                goto err1;
        }