[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220819060801.10443-19-jinpu.wang@ionos.com>
Date: Fri, 19 Aug 2022 08:08:00 +0200
From: Jack Wang <jinpu.wang@...os.com>
To: linux-kernel@...r.kernel.org
Cc: Paul Cercueil <paul@...pouillou.net>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-mips@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: [PATCH v1 18/19] mmc: jz4740_mmc: Fix error check for dma_map_sg
dma_map_sg return 0 on error.
Cc: Paul Cercueil <paul@...pouillou.net>
Cc: Ulf Hansson <ulf.hansson@...aro.org>
Cc: linux-mips@...r.kernel.org
Cc: linux-mmc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@...os.com>
---
drivers/mmc/host/jz4740_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index b1d563b2ed1b..666600055b06 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -308,7 +308,7 @@ static int jz4740_mmc_prepare_dma_data(struct jz4740_mmc_host *host,
data->sg_len,
dir);
- if (sg_count <= 0) {
+ if (!sg_count) {
dev_err(mmc_dev(host->mmc),
"Failed to map scatterlist for DMA operation\n");
return -EINVAL;
--
2.34.1
Powered by blists - more mailing lists