]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 19 Oct 2016 13:23:50 +0000 (13:23 +0000)
committerVinod Koul <vinod.koul@intel.com>
Wed, 19 Oct 2016 16:59:33 +0000 (22:29 +0530)
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>
drivers/dma/st_fdma.c

index 232d3547a6a370ac6520980d721f2af1797d0894..bfb79bd0c6de5733205c22baeec582bc2fdf9ec7 100644 (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;