From: Shawn Lin Date: Tue, 6 Jan 2026 02:16:52 +0000 (+0800) Subject: mmc: dw_mmc: Check return value of dma_ops->init() in resume X-Git-Tag: v7.1-rc1~157^2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4db2a6c8576f75f16b253c1fd15c821c40662aa2;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 5c7859a86dcce..e437a142a76e6 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