diff mbox

thermal: Add braces around suspect code

Message ID 1403134328-4668-1-git-send-email-sboyd@codeaurora.org (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Stephen Boyd June 18, 2014, 11:32 p.m. UTC
It looks like this code is missing braces, otherwise the if
statement shouldn't have been indented. Fix it.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/thermal/of-thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Punit Agrawal June 30, 2014, 3:03 p.m. UTC | #1
Stephen Boyd <sboyd@codeaurora.org> writes:

> It looks like this code is missing braces, otherwise the if
> statement shouldn't have been indented. Fix it.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  drivers/thermal/of-thermal.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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);

Looks good to me.

Reviewed-by: Punit Agrawal <punit.agrawal@arm.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);