diff mbox series

rsi: fix an error code in rsi_probe()

Message ID 20210816183947.GA2119@kili (mailing list archive)
State Accepted
Commit 9adcdf6758d7c4c9bdaf22d78eb9fcae260ed113
Delegated to: Kalle Valo
Headers show
Series rsi: fix an error code in rsi_probe() | expand

Commit Message

Dan Carpenter Aug. 16, 2021, 6:39 p.m. UTC
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>
---
 drivers/net/wireless/rsi/rsi_91x_usb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo Aug. 21, 2021, 5:27 p.m. UTC | #1
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

9adcdf6758d7 rsi: fix an error code in rsi_probe()
diff mbox series

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 3fbe2a3c1455..416976f09888 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -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;
 	}