linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: stm32-dmamux: Remove unnecessary platform_get_resource() error check
@ 2018-01-17 11:27 Wei Yongjun
  2018-01-18 14:42 ` Pierre Yves MORDRET
  2018-01-19  5:38 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-01-17 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dma/stm32-dmamux.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index d5db0f6..4dbb30c 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -253,9 +253,6 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	iomem = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(iomem))
 		return PTR_ERR(iomem);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-19  5:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 11:27 [PATCH -next] dmaengine: stm32-dmamux: Remove unnecessary platform_get_resource() error check Wei Yongjun
2018-01-18 14:42 ` Pierre Yves MORDRET
2018-01-19  5:38 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).