summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2015-11-25 17:16:21 +0800
committerTom Rini <[email protected]>2015-12-05 18:22:24 -0500
commit678e9316d48f78d162f705846b6f6eeab4aa5dd0 (patch)
treee25e20c850b7d68f4708a30008dc6b97c26015d7
parent9f8edb76512b0e8815e2e53e248c128414739fcc (diff)
common: mmc: unsigned char compared against 0
"enable" is unsigned char type and its value will not be negative, so discard "enable < 0". Signed-off-by: Peng Fan <[email protected]> Cc: Diego Santa Cruz <[email protected]> Cc: Pantelis Antoniou <[email protected]> Cc: Andrew Gabbasov <[email protected]> Cc: Simon Glass <[email protected]> Cc: Stefano Babic <[email protected]> Cc: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
-rw-r--r--common/cmd_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index dfc1ec850e2..a6b7313e4a4 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;
}