summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/libertas/if_cs.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-10-07 02:33:27 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-10-13 20:03:53 +0300
commitbbc2a101f06beef093dda87bd7de47ad532e5448 (patch)
tree53225ac9a580f2550d30156c2404cb7c7540e118 /drivers/net/wireless/marvell/libertas/if_cs.c
parent6528d88047801b80d2a5370ad46fb6eff2f509e0 (diff)
downloadlinux-bbc2a101f06beef093dda87bd7de47ad532e5448.tar.gz
linux-bbc2a101f06beef093dda87bd7de47ad532e5448.tar.bz2
linux-bbc2a101f06beef093dda87bd7de47ad532e5448.zip
libertas: return errno from lbs_add_card()
This makes the error handling somewhat cleaner -- lbs_add_card() does no logner throw away the errno and lets its callers propagate it. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/libertas/if_cs.c')
-rw-r--r--drivers/net/wireless/marvell/libertas/if_cs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/libertas/if_cs.c b/drivers/net/wireless/marvell/libertas/if_cs.c
index 7d88223f890b..cebf03c6a622 100644
--- a/drivers/net/wireless/marvell/libertas/if_cs.c
+++ b/drivers/net/wireless/marvell/libertas/if_cs.c
@@ -900,8 +900,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
/* Make this card known to the libertas driver */
priv = lbs_add_card(card, &p_dev->dev);
- if (!priv) {
- ret = -ENOMEM;
+ if (IS_ERR(priv)) {
+ ret = PTR_ERR(priv);
goto out2;
}