* [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
@ 2017-10-03 10:54 Dan Carpenter
2017-10-03 12:17 ` Pierre Yves MORDRET
2017-10-08 10:59 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-10-03 10:54 UTC (permalink / raw)
To: kernel-janitors
devm_ioremap_resource() doesn't return NULL, it returns error pointers.
Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index 22812e7a953b..d5db0f6e1ff8 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -257,8 +257,8 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
return -ENODEV;
iomem = devm_ioremap_resource(&pdev->dev, res);
- if (!iomem)
- return -ENOMEM;
+ if (IS_ERR(iomem))
+ return PTR_ERR(iomem);
spin_lock_init(&stm32_dmamux->lock);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
2017-10-03 10:54 [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe Dan Carpenter
@ 2017-10-03 12:17 ` Pierre Yves MORDRET
2017-10-08 10:59 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Pierre Yves MORDRET @ 2017-10-03 12:17 UTC (permalink / raw)
To: kernel-janitors
On 10/03/2017 12:54 PM, Dan Carpenter wrote:
> devm_ioremap_resource() doesn't return NULL, it returns error pointers.
>
> Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
> index 22812e7a953b..d5db0f6e1ff8 100644
> --- a/drivers/dma/stm32-dmamux.c
> +++ b/drivers/dma/stm32-dmamux.c
> @@ -257,8 +257,8 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
> return -ENODEV;
>
> iomem = devm_ioremap_resource(&pdev->dev, res);
> - if (!iomem)
> - return -ENOMEM;
> + if (IS_ERR(iomem))
> + return PTR_ERR(iomem);
>
> spin_lock_init(&stm32_dmamux->lock);
>
>
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
2017-10-03 10:54 [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe Dan Carpenter
2017-10-03 12:17 ` Pierre Yves MORDRET
@ 2017-10-08 10:59 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-10-08 10:59 UTC (permalink / raw)
To: kernel-janitors
On Tue, Oct 03, 2017 at 01:54:50PM +0300, Dan Carpenter wrote:
> devm_ioremap_resource() doesn't return NULL, it returns error pointers.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-08 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 10:54 [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe Dan Carpenter
2017-10-03 12:17 ` Pierre Yves MORDRET
2017-10-08 10:59 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox