summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-11-25 17:16:21 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2016-03-04 15:35:53 +0800
commitcd6c9f2881617bda1d07a8fa6a9ecd1c665cb7c1 (patch)
tree6a8f7b71e31122e85d99ee2732f287d8f018e418
parent80619e6641db799e13b73d4940f8ec4ae9861128 (diff)
downloadu-boot-imx-cd6c9f2881617bda1d07a8fa6a9ecd1c665cb7c1.zip
u-boot-imx-cd6c9f2881617bda1d07a8fa6a9ecd1c665cb7c1.tar.gz
u-boot-imx-cd6c9f2881617bda1d07a8fa6a9ecd1c665cb7c1.tar.bz2
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 <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: Simon Glass <sjg@chromium.org> (cherry picked from commit 678e9316d48f78d162f705846b6f6eeab4aa5dd0)
-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 1335e3d..14ab93d 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -746,7 +746,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;
}