dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
Subsystems (2)
PATCH 1/1 dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
From: Wei Yongjun <[email protected]>
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().
--- drivers/dma/st_fdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/st_fdma.c +1 -1
@@ -802,7 +802,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;
PATCH 1/1 dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
Hi Wei,
Quoted 8 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
st_slim_rproc_alloc()returnsERR_PTR()and never returns NULL. The NULL test in the return value check should be replaced withIS_ERR().Signed-off-by Wei Yongjun <[email protected]>---
Good spot.
Vinod Koul
AppliedPATCH 1/1 dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
In reply to Wei YongjunQuoted 6 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
st_slim_rproc_alloc()returnsERR_PTR()and never returns NULL. The NULL test in the return value check should be replaced withIS_ERR().
Applied, thanks
Signature · 1 line
~Vinod