From: Fabio Estevam Date: Mon, 22 Jul 2013 01:16:21 +0000 (-0300) Subject: pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource() X-Git-Tag: firefly_0821_release~176^2~5439^2~72 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f29bdca0db907b4c7c959d381e488b8920487a15;p=firefly-linux-kernel-4.4.55.git pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource() As devm_ioremap_resource() is used on probe, there is no need to explicitly check the return value from platform_get_resource(), as this is something that devm_ioremap_resource() takes care by itself. Signed-off-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index 57a4eb0add2e..dea739a1c81f 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c @@ -580,9 +580,6 @@ int imx_pinctrl_probe(struct platform_device *pdev, return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENOENT; - ipctl->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(ipctl->base)) return PTR_ERR(ipctl->base);