Thread (16 messages) flat view 16 messages, 2 authors, 2016-11-14
STALE3603d REVIEWED: 5 (5M)

Revision v11 of 8 in this series; 1 review trailer.

Revisions (8)
  1. v5 [diff vs current]
  2. v6 [diff vs current]
  3. v7 [diff vs current]
  4. v8 [diff vs current]
  5. v8 [diff vs current]
  6. v9 [diff vs current]
  7. v9 [diff vs current]
  8. v11 current

[PATCH v11 13/14] dmaengine: st_fdma: Fix the error return code in st_fdma_probe()

From: peter.griffin@linaro.org (Peter Griffin)
Date: 2016-11-07 18:19:10
Also in: lkml
Subsystem: arm/sti architecture, dma generic offload engine subsystem, the rest · Maintainers: Patrice Chotard, Vinod Koul, Linus Torvalds

From: Wei Yongjun <redacted>

In case of error, the function st_slim_rproc_alloc() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <redacted>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/dma/st_fdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 232d354..bfb79bd 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -792,7 +792,7 @@ static int st_fdma_probe(struct platform_device *pdev)
 	}
 
 	fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name);
-	if (!fdev->slim_rproc) {
+	if (IS_ERR(fdev->slim_rproc)) {
 		ret = PTR_ERR(fdev->slim_rproc);
 		dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret);
 		goto err;
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help