summaryrefslogtreecommitdiffstats
path: root/commands/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/i2c.c')
-rw-r--r--commands/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/i2c.c b/commands/i2c.c
index 36d80f3a4e..763db8a1ab 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -177,7 +177,7 @@ static int do_i2c_read(int argc, char *argv[])
}
}
- if ((addr < 0) || (reg < 0) || (count == 0) || (addr > 0x7F))
+ if ((addr < 0) || (reg < 0) || (count < 1) || (addr > 0x7F))
return COMMAND_ERROR_USAGE;
adapter = i2c_get_adapter(bus);