Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e687cd19 authored by Wei Yongjun's avatar Wei Yongjun Committed by Vinod Koul
Browse files

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 919b742f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -792,7 +792,7 @@ static int st_fdma_probe(struct platform_device *pdev)
	}
	}


	fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name);
	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);
		ret = PTR_ERR(fdev->slim_rproc);
		dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret);
		dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret);
		goto err;
		goto err;