[PATCH -next] dmaengine: stm32-dmamux: Remove unnecessary platform_get_resource() error check

Wei Yongjun weiyongjun1 at huawei.com
Wed Jan 17 03:27:10 PST 2018


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 at 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);




More information about the linux-arm-kernel mailing list