All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i.MX6: WEIM: put node reference on early loop exit
@ 2015-02-13 17:33 alison at she-devel.com
  2015-02-16  5:47 ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: alison at she-devel.com @ 2015-02-13 17:33 UTC (permalink / raw)
  To: linux-arm-kernel

From: Alison Chaiken <alison_chaiken@mentor.com>

Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com>
---
 drivers/bus/imx-weim.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 0958b69..11f2c8b 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -158,7 +158,7 @@ static int __init weim_parse_dt(struct platform_device *pdev,
 		if (ret) {
 			dev_err(&pdev->dev, "%s set timing failed.\n",
 				child->full_name);
-			return ret;
+			goto put_node;
 		}
 	}
 
@@ -166,7 +166,14 @@ static int __init weim_parse_dt(struct platform_device *pdev,
 				   of_default_bus_match_table,
 				   NULL, &pdev->dev);
 	if (ret)
-		dev_err(&pdev->dev, "%s fail to create devices.\n",
+		goto out;
+
+	return 0;
+
+put_node:
+	of_node_put(child);
+out:
+	dev_err(&pdev->dev, "%s fail to create devices.\n",
 			pdev->dev.of_node->full_name);
 	return ret;
 }
-- 
2.1.4

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

end of thread, other threads:[~2015-03-02 13:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 17:33 [PATCH] i.MX6: WEIM: put node reference on early loop exit alison at she-devel.com
2015-02-16  5:47 ` Sascha Hauer
2015-02-17 16:28   ` Chaiken, Alison
2015-02-17 17:51     ` Joshua Clayton
2015-02-18  8:37       ` [PATCH] i.MX6: WEIM: improve error handling upon child probe-failure alison at she-devel.com
2015-02-18 16:30         ` Joshua Clayton
2015-02-19  7:19       ` [PATCH v3 0/1] " alison at she-devel.com
2015-02-19  7:24       ` [PATCH v3 1/1] " alison at she-devel.com
2015-02-23  7:17         ` Sascha Hauer
2015-03-02 13:51         ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.