]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
IOMUX: Drop indentation level by removing redundant 'else'
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 21 Dec 2020 12:30:07 +0000 (14:30 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 15 Jan 2021 19:38:00 +0000 (14:38 -0500)
Obviously the following has unnecessary indentation level in 'else' branch.

if (foo) {
...
return;
} else {
...
}

Drop indentation level by removing redundant 'else'.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/iomux.c

index 7991235d11971bb59c7742472a6da12030d4dde1..126d92ce850fb0768b3cce0a282d90e257264619 100644 (file)
@@ -126,12 +126,12 @@ int iomux_doenv(const int console, const char *arg)
        if (cs_idx == 0) {
                free(cons_set);
                return 1;
-       } else {
-               /* Works even if console_devices[console] is NULL. */
-               free(console_devices[console]);
-               console_devices[console] = cons_set;
-               cd_count[console] = cs_idx;
        }
+
+       /* Works even if console_devices[console] is NULL. */
+       free(console_devices[console]);
+       console_devices[console] = cons_set;
+       cd_count[console] = cs_idx;
        return 0;
 }
 #endif /* CONSOLE_MUX */