Skip to contentSkip to conversation

pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource()

PATCH In review Fabio Estevam 3 participants 3 messages Jul 22, 2013

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource()

From: Fabio Estevam <[email protected]>

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.

---
 drivers/pinctrl/pinctrl-imx.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/pinctrl/pinctrl-imx.c +0 -3
index 57a4eb0..dea739a 100644
@@ -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);
Signature · 1 line
1.8.1.2