[U-Boot] [PATCH] common: mmc: unsigned char compared against 0
Peng Fan
Peng.Fan at freescale.com
Wed Nov 25 10:16:21 CET 2015
"enable" is unsigned char type and its value will not be
negative, so discard "enable < 0".
Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
Cc: Diego Santa Cruz <Diego.SantaCruz at spinetix.com>
Cc: Pantelis Antoniou <pantelis.antoniou at konsulko.com>
Cc: Andrew Gabbasov <andrew_gabbasov at mentor.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Tom Rini <trini at konsulko.com>
---
common/cmd_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index dfc1ec8..a6b7313 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -747,7 +747,7 @@ static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
dev = simple_strtoul(argv[1], NULL, 10);
enable = simple_strtoul(argv[2], NULL, 10);
- if (enable > 2 || enable < 0) {
+ if (enable > 2) {
puts("Invalid RST_n_ENABLE value\n");
return CMD_RET_USAGE;
}
--
2.6.2
More information about the U-Boot
mailing list