diff mbox series

mmc: sdio: Return ret if sdio_disable_func() fails

Message ID 20200604100102.13572-1-zbestahu@gmail.com (mailing list archive)
State New, archived
Headers show
Series mmc: sdio: Return ret if sdio_disable_func() fails | expand

Commit Message

Yue Hu June 4, 2020, 10:01 a.m. UTC
From: Yue Hu <huyue2@yulong.com>

We should return any possible error returned by mmc_io_rw_direct()
rather than only -EIO in sdio_disable_func() failure path.

Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 drivers/mmc/core/sdio_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Doug Anderson June 4, 2020, 9:38 p.m. UTC | #1
Hi,

On Thu, Jun 4, 2020 at 3:01 AM Yue Hu <zbestahu@gmail.com> wrote:
>
> From: Yue Hu <huyue2@yulong.com>
>
> We should return any possible error returned by mmc_io_rw_direct()
> rather than only -EIO in sdio_disable_func() failure path.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
> ---
>  drivers/mmc/core/sdio_io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Seems sane to me.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Ulf Hansson June 16, 2020, 11:32 a.m. UTC | #2
On Thu, 4 Jun 2020 at 12:01, Yue Hu <zbestahu@gmail.com> wrote:
>
> From: Yue Hu <huyue2@yulong.com>
>
> We should return any possible error returned by mmc_io_rw_direct()
> rather than only -EIO in sdio_disable_func() failure path.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/sdio_io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
> index 2ba00ac..cba54df 100644
> --- a/drivers/mmc/core/sdio_io.c
> +++ b/drivers/mmc/core/sdio_io.c
> @@ -133,7 +133,7 @@ int sdio_disable_func(struct sdio_func *func)
>
>  err:
>         pr_debug("SDIO: Failed to disable device %s\n", sdio_func_id(func));
> -       return -EIO;
> +       return ret;
>  }
>  EXPORT_SYMBOL_GPL(sdio_disable_func);
>
> --
> 1.9.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 2ba00ac..cba54df 100644
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -133,7 +133,7 @@  int sdio_disable_func(struct sdio_func *func)
 
 err:
 	pr_debug("SDIO: Failed to disable device %s\n", sdio_func_id(func));
-	return -EIO;
+	return ret;
 }
 EXPORT_SYMBOL_GPL(sdio_disable_func);