public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource()
@ 2013-07-22  1:16 Fabio Estevam
  2013-07-22 12:49 ` Shawn Guo
  2013-07-22 23:21 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-07-22  1:16 UTC (permalink / raw)
  To: linus.walleij; +Cc: shawn.guo, linux-kernel, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

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>
---
 drivers/pinctrl/pinctrl-imx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 57a4eb0..dea739a 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);
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-22 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22  1:16 [PATCH] pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource() Fabio Estevam
2013-07-22 12:49 ` Shawn Guo
2013-07-22 23:21 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox