Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alison Chaiken and committed by
Shawn Guo
52c47b63 e654df7a

+7 -6
+7 -6
drivers/bus/imx-weim.c
··· 142 142 &pdev->dev); 143 143 const struct imx_weim_devtype *devtype = of_id->data; 144 144 struct device_node *child; 145 - int ret; 145 + int ret, have_child = 0; 146 146 147 147 if (devtype == &imx50_weim_devtype) { 148 148 ret = imx_weim_gpr_setup(pdev); ··· 155 155 continue; 156 156 157 157 ret = weim_timing_setup(child, base, devtype); 158 - if (ret) { 159 - dev_err(&pdev->dev, "%s set timing failed.\n", 158 + if (ret) 159 + dev_warn(&pdev->dev, "%s set timing failed.\n", 160 160 child->full_name); 161 - return ret; 162 - } 161 + else 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 167 of_default_bus_match_table, 167 168 NULL, &pdev->dev); 168 169 if (ret)