diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-09-06 22:17:38 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-09-23 17:53:53 -0400 |
commit | 63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4 (patch) | |
tree | 3c8e952ed36bd39aa138f5edf476e17d73fbea63 /board/corscience | |
parent | 7dc0789579b17859c61c085e4562b7985f05cc4d (diff) | |
download | u-boot-imx-63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4.zip u-boot-imx-63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4.tar.gz u-boot-imx-63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4.tar.bz2 |
arch, board: squash lines for immediate return
Remove unneeded variables and assignments.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewed-by: Angelo Dureghello <angelo@sysam.it>
Diffstat (limited to 'board/corscience')
-rw-r--r-- | board/corscience/tricorder/tricorder-eeprom.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c index 340a009..aeacd6a 100644 --- a/board/corscience/tricorder/tricorder-eeprom.c +++ b/board/corscience/tricorder/tricorder-eeprom.c @@ -190,13 +190,8 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (argc == 3) { ulong dev_addr = simple_strtoul(argv[2], NULL, 16); - if (strcmp(argv[1], "read") == 0) { - int rcode; - - rcode = tricorder_eeprom_read(dev_addr); - - return rcode; - } + if (strcmp(argv[1], "read") == 0) + return tricorder_eeprom_read(dev_addr); } else if (argc == 6 || argc == 7) { ulong dev_addr = simple_strtoul(argv[2], NULL, 16); char *name = argv[3]; @@ -207,14 +202,9 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (argc == 7) interface = argv[6]; - if (strcmp(argv[1], "write") == 0) { - int rcode; - - rcode = tricorder_eeprom_write(dev_addr, name, version, - serial, interface); - - return rcode; - } + if (strcmp(argv[1], "write") == 0) + return tricorder_eeprom_write(dev_addr, name, version, + serial, interface); } return CMD_RET_USAGE; |