Skip to contentSkip to conversation

gpio: aspeed: remove redundant return value check of platform_get_resource()

PATCH In review Wei Yongjun 2 participants 2 messages Sep 21, 2016 – Sep 23, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: aspeed: remove redundant return value check of platform_get_resource()

From: Wei Yongjun <[email protected]>

Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource().

---
 drivers/gpio/gpio-aspeed.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpio/gpio-aspeed.c +0 -3
index 8aa3406..03a5925 100644
@@ -409,9 +409,6 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENXIO;
-
 	gpio->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(gpio->base))
 		return PTR_ERR(gpio->base);