From: Wei Yongjun Date: Wed, 21 Sep 2016 15:07:56 +0000 (+0000) Subject: gpio: aspeed: remove redundant return value check X-Git-Tag: v4.9-rc1~122^2~12 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=83626bbdf5ca31257066b05db5a38c846ae1e19f;p=linux.git gpio: aspeed: remove redundant return value check Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 8aa340677f65..03a5925a423c 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -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);