diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2016-07-12 10:21:35 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2016-07-14 11:19:51 -0700 |
commit | e4708900d1ece2031e5f65785c11e2f7b1dae97d (patch) | |
tree | 5b9710578e903be60830e766eac9772b477ff699 | |
parent | 1969e8e9562816c1730a47ca3f1833c245465761 (diff) |
of-thermal.c: fix code flaged by compiler warning
include/linux/of.h:803:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (child = of_get_next_child(parent, NULL); child != NULL; \
^
drivers/thermal/of-thermal.c:715:2: note: in expansion of macro 'for_each_child_of_node'
for_each_child_of_node(child, gchild)
^~~~~~~~~~~~~~~~~~~~~~
drivers/thermal/of-thermal.c:718:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
if (ret)
^~
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r-- | drivers/thermal/of-thermal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 04b1be7fa018..a95ee2889b19 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -712,11 +712,12 @@ thermal_of_build_thermal_zone(struct device_node *np) } i = 0; - for_each_child_of_node(child, gchild) + for_each_child_of_node(child, gchild) { ret = thermal_of_populate_bind_params(gchild, &tz->tbps[i++], tz->trips, tz->ntrips); if (ret) goto free_tbps; + } finish: of_node_put(child); |