mwifiex: propagate sdio_enable_func() errno code in mwifiex_sdio_probe()
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 27 May 2016 14:18:16 +0000 (10:18 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 16 Jun 2016 15:05:06 +0000 (18:05 +0300)
If the sdio_enable_func() function fails on .probe, the -EIO errno code
is always returned but that could make more difficult to debug and find
the cause of why the function actually failed.

Since the driver/device core prints the value returned by .probe in its
error message propagate what was returned by sdio_enable_func() at fail.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/sdio.c

index 3b30f27aab822d7cb55b5912c491920f9c002f9a..138dc1fcd3a9f88c3b21d7b815f625f3f280fff7 100644 (file)
@@ -184,7 +184,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
        if (ret) {
                pr_err("%s: failed to enable function\n", __func__);
                kfree(card);
-               return -EIO;
+               return ret;
        }
 
        /* device tree node parsing and platform specific configuration*/