[PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe()

From: Harshit Mogalapalli
Date: Mon Sep 16 2024 - 14:24:06 EST


ep93xx_dma_of_probe() returns error pointers on error. Change the NULL
check to IS_ERR() check instead.

Fixes: 5313a72f7e11 ("dmaengine: cirrus: Convert to DT for Cirrus EP93xx")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
---
This is based on static analysis with Smatch
---
drivers/dma/ep93xx_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index d084bd123c1c..ca86b2b5a913 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -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;
--
2.39.3