diff mbox series

thermal: rcar_thermal: Add missing braces to conditional statement

Message ID 20200819092716.3191-1-geert+renesas@glider.be
State New
Delegated to: Daniel Lezcano
Headers show
Series thermal: rcar_thermal: Add missing braces to conditional statement | expand

Commit Message

Geert Uytterhoeven Aug. 19, 2020, 9:27 a.m. UTC
According to Documentation/process/coding-style.rst, if one branch of a
conditional statement needs braces, both branches should use braces.

Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/thermal/rcar_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Niklas Söderlund Aug. 20, 2020, 6:45 a.m. UTC | #1
Hi Geert,

Thanks for your work.

On 2020-08-19 11:27:16 +0200, Geert Uytterhoeven wrote:
> According to Documentation/process/coding-style.rst, if one branch of a
> conditional statement needs braces, both branches should use braces.
> 
> Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/thermal/rcar_thermal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 787710bb88fee890..5c2a13bf249ccb87 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -546,11 +546,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  		if (ret < 0)
>  			goto error_unregister;
>  
> -		if (chip->use_of_thermal)
> +		if (chip->use_of_thermal) {
>  			priv->zone = devm_thermal_zone_of_sensor_register(
>  						dev, i, priv,
>  						&rcar_thermal_zone_of_ops);
> -		else {
> +		} else {
>  			priv->zone = thermal_zone_device_register(
>  						"rcar_thermal",
>  						1, 0, priv,
> -- 
> 2.17.1
>
Daniel Lezcano Aug. 24, 2020, 10:41 a.m. UTC | #2
On 19/08/2020 11:27, Geert Uytterhoeven wrote:
> According to Documentation/process/coding-style.rst, if one branch of a
> conditional statement needs braces, both branches should use braces.
> 
> Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 787710bb88fee890..5c2a13bf249ccb87 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -546,11 +546,11 @@  static int rcar_thermal_probe(struct platform_device *pdev)
 		if (ret < 0)
 			goto error_unregister;
 
-		if (chip->use_of_thermal)
+		if (chip->use_of_thermal) {
 			priv->zone = devm_thermal_zone_of_sensor_register(
 						dev, i, priv,
 						&rcar_thermal_zone_of_ops);
-		else {
+		} else {
 			priv->zone = thermal_zone_device_register(
 						"rcar_thermal",
 						1, 0, priv,