summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2026-01-06 05:16:52 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2026-02-23 14:06:54 +0300
commit4db2a6c8576f75f16b253c1fd15c821c40662aa2 (patch)
tree3c9b0c9f23f70e10606d4ae077ee3daadcc3dc1b
parentc740532de087009b18981ab14be42c45494c246d (diff)
downloadlinux-4db2a6c8576f75f16b253c1fd15c821c40662aa2.tar.xz
mmc: dw_mmc: Check return value of dma_ops->init() in resume
dma_ops->init() may fail, should check the return value. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/dw_mmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 5c7859a86dcc..e437a142a76e 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3524,8 +3524,11 @@ int dw_mci_runtime_resume(struct device *dev)
goto err;
}
- if (host->use_dma && host->dma_ops->init)
- host->dma_ops->init(host);
+ if (host->use_dma && host->dma_ops->init) {
+ ret = host->dma_ops->init(host);
+ if (ret)
+ return ret;
+ }
/*
* Restore the initial value at FIFOTH register