aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-19 13:23:50 +0000
committerVinod Koul <vinod.koul@intel.com>2016-10-19 22:29:33 +0530
commite687cd19f1cb9d3bbb16146fe7a8740cf836e481 (patch)
treec05c7f4d06f2c197e9e15b66fca3cba382791005 /drivers/dma
parentdmaengine: st_fdma: fix uninitialized variable access (diff)
downloadlinux-dev-e687cd19f1cb9d3bbb16146fe7a8740cf836e481.tar.xz
linux-dev-e687cd19f1cb9d3bbb16146fe7a8740cf836e481.zip
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>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/st_fdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 232d3547a6a3..bfb79bd0c6de 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -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;