* [PATCH -next] gpio: aspeed: remove redundant return value check of platform_get_resource()
@ 2016-09-21 15:07 Wei Yongjun
2016-09-23 13:12 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-21 15:07 UTC (permalink / raw)
To: Joel Stanley, Linus Walleij, Alexandre Courbot; +Cc: Wei Yongjun, linux-gpio
From: Wei Yongjun <weiyongjun1@huawei.com>
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 <weiyongjun1@huawei.com>
---
drivers/gpio/gpio-aspeed.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 8aa3406..03a5925 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] gpio: aspeed: remove redundant return value check of platform_get_resource()
2016-09-21 15:07 [PATCH -next] gpio: aspeed: remove redundant return value check of platform_get_resource() Wei Yongjun
@ 2016-09-23 13:12 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-09-23 13:12 UTC (permalink / raw)
To: Wei Yongjun
Cc: Joel Stanley, Alexandre Courbot, Wei Yongjun,
linux-gpio@vger.kernel.org
On Wed, Sep 21, 2016 at 5:07 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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 <weiyongjun1@huawei.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-23 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 15:07 [PATCH -next] gpio: aspeed: remove redundant return value check of platform_get_resource() Wei Yongjun
2016-09-23 13:12 ` Linus Walleij
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).