projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7865ad
)
mmc: jz4740_mmc: Fix error check for dma_map_sg
author
Jack Wang
<jinpu.wang@ionos.com>
Thu, 25 Aug 2022 07:40:08 +0000
(09:40 +0200)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Wed, 14 Sep 2022 09:53:47 +0000
(11:53 +0200)
dma_map_sg return 0 on error.
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link:
https://lore.kernel.org/r/20220825074008.33349-3-jinpu.wang@ionos.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/jz4740_mmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/jz4740_mmc.c
b/drivers/mmc/host/jz4740_mmc.c
index b1d563b2ed1b01a10f2da7608a1102e95d240fd1..dc2db9c185ea0d4fe9ea7c48825b755378803e13 100644
(file)
--- a/
drivers/mmc/host/jz4740_mmc.c
+++ b/
drivers/mmc/host/jz4740_mmc.c
@@
-298,7
+298,7
@@
static int jz4740_mmc_prepare_dma_data(struct jz4740_mmc_host *host,
{
struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
enum dma_data_direction dir = mmc_get_dma_dir(data);
- int sg_count;
+
unsigned
int sg_count;
if (data->host_cookie == COOKIE_PREMAPPED)
return data->sg_count;
@@
-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;