public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: Add braces around suspect code
@ 2014-06-18 23:32 Stephen Boyd
  2014-06-30 15:03 ` Punit Agrawal
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2014-06-18 23:32 UTC (permalink / raw)
  To: Eduardo Valentin, Zhang Rui; +Cc: linux-kernel, linux-pm

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);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


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

* Re: [PATCH] thermal: Add braces around suspect code
  2014-06-18 23:32 [PATCH] thermal: Add braces around suspect code Stephen Boyd
@ 2014-06-30 15:03 ` Punit Agrawal
  0 siblings, 0 replies; 2+ messages in thread
From: Punit Agrawal @ 2014-06-30 15:03 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Eduardo Valentin, Zhang Rui, linux-kernel, linux-pm

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>

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

end of thread, other threads:[~2014-06-30 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 23:32 [PATCH] thermal: Add braces around suspect code Stephen Boyd
2014-06-30 15:03 ` Punit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox