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

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

pinctrl: mediatek: remove redundant return value check of platform_get_resource()



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 ce397d21
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1000,11 +1000,6 @@ static int mtk_eint_init(struct mtk_pinctrl *pctl, struct platform_device *pdev)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		dev_err(&pdev->dev, "Unable to get eint resource\n");
		return -ENODEV;
	}

	pctl->eint->base = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(pctl->eint->base))
		return PTR_ERR(pctl->eint->base);