From: Peng Fan Date: Wed, 25 Nov 2015 09:16:21 +0000 (+0800) Subject: common: mmc: unsigned char compared against 0 X-Git-Tag: v2016.01-rc2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=678e9316d48f78d162f705846b6f6eeab4aa5dd0;p=platform%2Fkernel%2Fu-boot.git 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 Cc: Diego Santa Cruz Cc: Pantelis Antoniou Cc: Andrew Gabbasov Cc: Simon Glass Cc: Stefano Babic Cc: Tom Rini Reviewed-by: Simon Glass --- 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; }