cmd: load: Fix code indentation
authorMichal Simek <michal.simek@xilinx.com>
Tue, 1 Dec 2020 12:58:28 +0000 (13:58 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 4 Jan 2021 09:51:26 +0000 (10:51 +0100)
Reported by smatch like:
cmd/load.c:228 read_record() warn: inconsistent indenting

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/load.c

index 9a3a169..c6a7cc4 100644 (file)
@@ -228,12 +228,11 @@ static int read_record(char *buf, ulong len)
                        *p = c;
                }
 
-           /* Check for the console hangup (if any different from serial) */
-           if (gd->jt->getc != getchar) {
-               if (ctrlc()) {
-                   return (-1);
+               /* Check for the console hangup (if any different from serial) */
+               if (gd->jt->getc != getchar) {
+                       if (ctrlc())
+                               return (-1);
                }
-           }
        }
 
        /* line too long - truncate */