Skip to content

Commit

Permalink
rsi: fix an error code in rsi_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 9adcdf6 ]

Return -ENODEV instead of success for unsupported devices.

Fixes: 54fdb31 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 15, 2021
1 parent 110ce7d commit 56d976f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/rsi/rsi_91x_usb.c
Expand Up @@ -814,6 +814,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;
}

Expand Down

0 comments on commit 56d976f

Please sign in to comment.