Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Vinod Koul
e687cd19 919b742f

+1 -1
+1 -1
drivers/dma/st_fdma.c
··· 792 792 } 793 793 794 794 fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name); 795 - if (!fdev->slim_rproc) { 795 + if (IS_ERR(fdev->slim_rproc)) { 796 796 ret = PTR_ERR(fdev->slim_rproc); 797 797 dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret); 798 798 goto err;