1
0
Fork 0

dmaengine: st_fdma: Fix the error return code in st_fdma_probe()

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>
zero-colors
Wei Yongjun 2016-10-19 13:23:50 +00:00 committed by Vinod Koul
parent 919b742fb5
commit e687cd19f1
1 changed files with 1 additions and 1 deletions

View File

@ -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;