소스 검색

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 <weiyongjun1@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Wei Yongjun 9 년 전
부모
커밋
83626bbdf5
1개의 변경된 파일0개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 3
      drivers/gpio/gpio-aspeed.c

+ 0 - 3
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);