From: Tom Rini <trini@konsulko.com>
Date: Tue, 9 May 2017 02:14:19 +0000 (-0400)
Subject: socrates: Fix a misleading indentation warning
X-Git-Tag: v2025.01-rc5-pxa1908~6931
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=1f7efe82bdd5677500cc864ee53530d73367afab;p=u-boot.git

socrates: Fix a misleading indentation warning

With gcc-6 and later we see a warning about the fact that we have a
construct of "if (test);\n\tstatement".  Upon reviewing the code, the
intention here is as the compiler suggests, we only want to execute the
indented statement if the test was true.

Cc: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---

diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 8b34a80e8f..fb691c22d9 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -378,7 +378,7 @@ static void board_backlight_brightness(int br)
 
 		/* LEDs on */
 		reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c));
-		if (!(reg & BACKLIGHT_ENABLE));
+		if (!(reg & BACKLIGHT_ENABLE))
 			out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c),
 				 reg | BACKLIGHT_ENABLE);
 	} else {