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 b3d09dcb7c..39bae35a33 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -170,7 +170,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);