* [PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe()
@ 2024-09-16 18:23 Harshit Mogalapalli
2024-09-16 18:32 ` Alexander Sverdlin
0 siblings, 1 reply; 3+ messages in thread
From: Harshit Mogalapalli @ 2024-09-16 18:23 UTC (permalink / raw)
To: Vinod Koul, Nikita Shubin, Alexander Sverdlin, Arnd Bergmann,
dmaengine, linux-kernel
Cc: dan.carpenter, kernel-janitors, error27, harshit.m.mogalapalli
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@oracle.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe()
2024-09-16 18:23 [PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe() Harshit Mogalapalli
@ 2024-09-16 18:32 ` Alexander Sverdlin
2024-09-16 18:34 ` Harshit Mogalapalli
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Sverdlin @ 2024-09-16 18:32 UTC (permalink / raw)
To: Harshit Mogalapalli, Vinod Koul, Nikita Shubin, Arnd Bergmann,
dmaengine, linux-kernel
Cc: dan.carpenter, kernel-janitors, error27
Hi Harshit,
thanks for looking into this!
On Mon, 2024-09-16 at 11:23 -0700, Harshit Mogalapalli wrote:
> 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@oracle.com>
Dan has already fixed this though:
https://lore.kernel.org/lkml/459a965f-f49c-45b1-8362-5ac27b56f5ff@stanley.mountain/
> ---
> 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;
--
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe()
2024-09-16 18:32 ` Alexander Sverdlin
@ 2024-09-16 18:34 ` Harshit Mogalapalli
0 siblings, 0 replies; 3+ messages in thread
From: Harshit Mogalapalli @ 2024-09-16 18:34 UTC (permalink / raw)
To: Alexander Sverdlin, Vinod Koul, Nikita Shubin, Arnd Bergmann,
dmaengine, linux-kernel
Cc: dan.carpenter, kernel-janitors, error27
Hi Alexander,
On 17/09/24 00:02, Alexander Sverdlin wrote:
> Hi Harshit,
>
> thanks for looking into this!
>
> On Mon, 2024-09-16 at 11:23 -0700, Harshit Mogalapalli wrote:
>> 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@oracle.com>
>
> Dan has already fixed this though:
> https://lore.kernel.org/lkml/459a965f-f49c-45b1-8362-5ac27b56f5ff@stanley.mountain/
>
Sorry for the noise, I thought I checked lore before sending, but I didnot.
Regards,
Harshit
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-16 18:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 18:23 [PATCH] dmaengine: ep93xx: Fix NULL vs IS_ERR() check in ep93xx_dma_probe() Harshit Mogalapalli
2024-09-16 18:32 ` Alexander Sverdlin
2024-09-16 18:34 ` Harshit Mogalapalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®