diff options
author | Alison Chaiken <alison_chaiken@mentor.com> | 2015-02-19 02:24:10 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2015-03-02 08:47:59 -0500 |
commit | 52c47b63412b0946fcf3c04b5e152df41fc7eca5 (patch) | |
tree | dc7d910dd4f8a6055172d3c8b2dc91f7f54a970d | |
parent | e654df7a1a4843429b5d1d6ee40cac9ecef75304 (diff) |
bus: imx-weim: improve error handling upon child probe-failure
Probe all children of the WEIM node, reporting any failures. Report
failure from parsing of WEIM node itself if probes of all children fail.
Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | drivers/bus/imx-weim.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 0958b6981773..e98d15eaa799 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c | |||
@@ -142,7 +142,7 @@ static int __init weim_parse_dt(struct platform_device *pdev, | |||
142 | &pdev->dev); | 142 | &pdev->dev); |
143 | const struct imx_weim_devtype *devtype = of_id->data; | 143 | const struct imx_weim_devtype *devtype = of_id->data; |
144 | struct device_node *child; | 144 | struct device_node *child; |
145 | int ret; | 145 | int ret, have_child = 0; |
146 | 146 | ||
147 | if (devtype == &imx50_weim_devtype) { | 147 | if (devtype == &imx50_weim_devtype) { |
148 | ret = imx_weim_gpr_setup(pdev); | 148 | ret = imx_weim_gpr_setup(pdev); |
@@ -155,14 +155,15 @@ static int __init weim_parse_dt(struct platform_device *pdev, | |||
155 | continue; | 155 | continue; |
156 | 156 | ||
157 | ret = weim_timing_setup(child, base, devtype); | 157 | ret = weim_timing_setup(child, base, devtype); |
158 | if (ret) { | 158 | if (ret) |
159 | dev_err(&pdev->dev, "%s set timing failed.\n", | 159 | dev_warn(&pdev->dev, "%s set timing failed.\n", |
160 | child->full_name); | 160 | child->full_name); |
161 | return ret; | 161 | else |
162 | } | 162 | have_child = 1; |
163 | } | 163 | } |
164 | 164 | ||
165 | ret = of_platform_populate(pdev->dev.of_node, | 165 | if (have_child) |
166 | ret = of_platform_populate(pdev->dev.of_node, | ||
166 | of_default_bus_match_table, | 167 | of_default_bus_match_table, |
167 | NULL, &pdev->dev); | 168 | NULL, &pdev->dev); |
168 | if (ret) | 169 | if (ret) |