Message ID | 1464358702-19083-3-git-send-email-javier@osg.samsung.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cc524d1706b775466bf16a0a1130105ae5c70f43 |
Delegated to: | Kalle Valo |
Headers | show |
Hi All, On Sat, May 28, 2016 at 12:18 AM, Javier Martinez Canillas <javier@osg.samsung.com> wrote: > 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> This looks sensible to me. Reviewed-by: Julian Calaby <julian.calaby@gmail.com> > --- > > drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks,
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 285b1b68f7e9..ab64507c84e1 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -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*/
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> --- drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)