summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-05-31 11:39:42 +0000
committerLinus Walleij <linus.walleij@linaro.org>2018-06-18 07:55:56 +0200
commitfb7298e1669ee84aa76f3483c91f1de4814aac11 (patch)
treed4fceb97b3ceae591cf7c4a6bb1c2d37a5e5c37a
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-fb7298e1669ee84aa76f3483c91f1de4814aac11.tar.bz2
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: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index b3799695d8db..16ff56f93501 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -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);