[PATCH v1 17/19] mmc: meson-mx-sdhc: Fix error check for dma_map_sg
Jack Wang
jinpu.wang at ionos.com
Thu Aug 18 23:07:59 PDT 2022
dma_map_sg return 0 on error.
Cc: Ulf Hansson <ulf.hansson at linaro.org>
Cc: Neil Armstrong <narmstrong at baylibre.com>
Cc: Kevin Hilman <khilman at baylibre.com>
Cc: Jerome Brunet <jbrunet at baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Cc: linux-mmc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang at ionos.com>
---
drivers/mmc/host/meson-mx-sdhc-mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c
index e92e63cb5641..b32364f20c32 100644
--- a/drivers/mmc/host/meson-mx-sdhc-mmc.c
+++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c
@@ -388,7 +388,7 @@ static int meson_mx_sdhc_map_dma(struct mmc_host *mmc, struct mmc_request *mrq)
dma_len = dma_map_sg(mmc_dev(mmc), data->sg, data->sg_len,
mmc_get_dma_dir(data));
- if (dma_len <= 0) {
+ if (!dma_len) {
dev_err(mmc_dev(mmc), "dma_map_sg failed\n");
return -ENOMEM;
}
--
2.34.1
More information about the linux-arm-kernel
mailing list