summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-30 06:22:34 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-11-11 20:38:58 +0100
commit7777bd458e9e7cf9ac604f22e5b1691628b45c66 (patch)
tree02b3ce61ea08df48d5fccb9315dd32456bb90bb7 /drivers
parentlibertas: potential oops in debugfs (diff)
downloadlinux-7777bd458e9e7cf9ac604f22e5b1691628b45c66.tar.xz
linux-7777bd458e9e7cf9ac604f22e5b1691628b45c66.zip
libertas: fix error return code in if_cs_probe()
Fix to return -ENODEV in the unknown model error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/if_cs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index ef8c98e21098..f499efc6abcf 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -902,6 +902,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
if (card->model == MODEL_UNKNOWN) {
pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n",
p_dev->manf_id, p_dev->card_id);
+ ret = -ENODEV;
goto out2;
}