Skip to content

Commit

Permalink
dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
Browse files Browse the repository at this point in the history
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 <weiyongjun1@huawei.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Wei Yongjun authored and Vinod Koul committed Oct 19, 2016
1 parent 919b742 commit e687cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/st_fdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e687cd1

Please sign in to comment.