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 <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Fabio Estevam 2013-07-21 22:16:21 -03:00 committed by Linus Walleij
parent f33334978a
commit f29bdca0db

View file

@ -580,9 +580,6 @@ int imx_pinctrl_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)
return -ENOENT;
ipctl->base = devm_ioremap_resource(&pdev->dev, res); ipctl->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ipctl->base)) if (IS_ERR(ipctl->base))
return PTR_ERR(ipctl->base); return PTR_ERR(ipctl->base);