mmc: sdio: Return ret if sdio_disable_func() fails
authorYue Hu <huyue2@yulong.com>
Thu, 4 Jun 2020 10:01:02 +0000 (18:01 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Jul 2020 10:18:23 +0000 (12:18 +0200)
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>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200604100102.13572-1-zbestahu@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sdio_io.c

index 2ba00acf64e6421152b54ac226b13b72dae14d2e..cba54dfb04f78c7da6a9ac6e8534157fbb6cc560 100644 (file)
@@ -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);