Commit 678e9316 authored by Peng Fan's avatar Peng Fan Committed by Tom Rini
Browse files

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: default avatarPeng Fan <Peng.Fan@freescale.com>
Cc: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 9f8edb76
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment