autoboot: Use if() for CONFIG_SILENT_CONSOLE
authorSimon Glass <sjg@chromium.org>
Sun, 21 Jul 2019 02:51:18 +0000 (20:51 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 2 Aug 2019 15:19:14 +0000 (11:19 -0400)
Avoid an #ifdef in this function, to improve readability.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/autoboot.c

index f832808b71ed1a3a8b0dab4b66d4d6537a415352..45df6656760b9ad9655d50be4bbe7e78a78e03ba 100644 (file)
@@ -286,10 +286,8 @@ static int abortboot(int bootdelay)
        if (bootdelay >= 0)
                abort = __abortboot(bootdelay);
 
-#ifdef CONFIG_SILENT_CONSOLE
-       if (abort)
+       if (IS_ENABLED(CONFIG_SILENT_CONSOLE) && abort)
                gd->flags &= ~GD_FLG_SILENT;
-#endif
 
        return abort;
 }