Skip to content

Commit

Permalink
gpio: aspeed: remove redundant return value check
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wei Yongjun authored and Linus Walleij committed Sep 23, 2016
1 parent 6e643d8 commit 83626bb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/gpio/gpio-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 83626bb

Please sign in to comment.