dmaengine: ep93xx: Fix a NULL vs IS_ERR() check in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 13 Sep 2024 14:35:11 +0000 (17:35 +0300)
committerArnd Bergmann <arnd@arndb.de>
Mon, 16 Sep 2024 11:17:15 +0000 (11:17 +0000)
This was intended to be an IS_ERR() check, not a NULL check.  The
ep93xx_dma_of_probe() function doesn't return NULL pointers.

Fixes: 4e8ad5ed845b ("dmaengine: cirrus: Convert to DT for Cirrus EP93xx")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/dma/ep93xx_dma.c

index 43c4241af7f5f7ccd05af6691c741a246a8f7511..7de04e8ace442cac7fef7b839a968032867e84f0 100644 (file)
@@ -1504,7 +1504,7 @@ static int ep93xx_dma_probe(struct platform_device *pdev)
        int ret;
 
        edma = ep93xx_dma_of_probe(pdev);
-       if (!edma)
+       if (IS_ERR(edma))
                return PTR_ERR(edma);
 
        dma_dev = &edma->dma_dev;