projects
/
wrapfs-2.6.37.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43f7960
)
dmaengine: imx-sdma: Fix error checking in sdma_event_remap
author
Miaoqian Lin
<linmq006@gmail.com>
Tue, 8 Mar 2022 06:49:51 +0000
(06:49 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 11:39:42 +0000
(13:39 +0200)
[ Upstream commit
7104b9cb35a33ad803a1adbbfa50569b008faf15
]
of_parse_phandle() returns NULL on errors, rather than error
pointers. Using NULL check on grp_np to fix this.
Fixes: d078cd1b4185 ("dmaengine: imx-sdma: Add imx6sx platform support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link:
https://lore.kernel.org/r/20220308064952.15743-1-linmq006@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/imx-sdma.c
patch
|
blob
|
history
diff --git
a/drivers/dma/imx-sdma.c
b/drivers/dma/imx-sdma.c
index eea89c3b54c1e4557925a7772609c6ef864f0ad6..709ead443fc5fb3cefddb5085fed880f078a3786 100644
(file)
--- a/
drivers/dma/imx-sdma.c
+++ b/
drivers/dma/imx-sdma.c
@@
-1771,7
+1771,7
@@
static int sdma_event_remap(struct sdma_engine *sdma)
u32 reg, val, shift, num_map, i;
int ret = 0;
- if (IS_ERR(np) ||
IS_ERR(gpr_np)
)
+ if (IS_ERR(np) ||
!gpr_np
)
goto out;
event_remap = of_find_property(np, propname, NULL);
@@
-1819,7
+1819,7
@@
static int sdma_event_remap(struct sdma_engine *sdma)
}
out:
- if (
!IS_ERR(gpr_np)
)
+ if (
gpr_np
)
of_node_put(gpr_np);
return ret;