Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e643d8d authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij
Browse files

gpio: loongson1: 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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 22a5db98
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -56,11 +56,6 @@ static int ls1x_gpio_probe(struct platform_device *pdev)
		return -ENOMEM;
		return -ENOMEM;


	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		dev_err(dev, "failed to get I/O memory\n");
		return -EINVAL;
	}

	gpio_reg_base = devm_ioremap_resource(dev, res);
	gpio_reg_base = devm_ioremap_resource(dev, res);
	if (IS_ERR(gpio_reg_base))
	if (IS_ERR(gpio_reg_base))
		return PTR_ERR(gpio_reg_base);
		return PTR_ERR(gpio_reg_base);