summaryrefslogtreecommitdiffstats
path: root/commands/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/spi.c')
-rw-r--r--commands/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/spi.c b/commands/spi.c
index 21db9ae237..6603b34b67 100644
--- a/commands/spi.c
+++ b/commands/spi.c
@@ -68,8 +68,8 @@ static int do_spi(int argc, char *argv[])
return -ENODEV;
}
- if (spi.chip_select > spi.master->num_chipselect) {
- printf("spi chip select (%d)> master num chipselect (%d)\n",
+ if (spi.chip_select >= spi.master->num_chipselect) {
+ printf("spi chip select (%d) >= master num chipselect (%d)\n",
spi.chip_select, spi.master->num_chipselect);
return -EINVAL;
}