Message ID | 20201221123008.9930-8-andriy.shevchenko@linux.intel.com |
---|---|
State | Accepted |
Commit | 420782c45b992c55201ee43426dcae2ffd9807a4 |
Delegated to: | Tom Rini |
Headers | show |
Series | [v3,1/9] console: Introduce console_start() and console_stop() | expand |
On Mon, Dec 21, 2020 at 02:30:07PM +0200, Andy Shevchenko wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/common/iomux.c b/common/iomux.c index 7991235d1197..126d92ce850f 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -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 */