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>
This commit is contained in:
Shawn Lin 2026-01-06 10:16:52 +08:00 committed by Ulf Hansson
parent c740532de0
commit 4db2a6c857

View File

@ -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