aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/omap2_mcspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/omap2_mcspi.c')
-rw-r--r--drivers/spi/omap2_mcspi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index d6d0c5d241ce..b4f3b753d0f4 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -619,9 +619,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
619 return -EINVAL; 619 return -EINVAL;
620 } 620 }
621 621
622 if (spi->bits_per_word == 0) 622 if (spi->bits_per_word < 4 || spi->bits_per_word > 32) {
623 spi->bits_per_word = 8;
624 else if (spi->bits_per_word < 4 || spi->bits_per_word > 32) {
625 dev_dbg(&spi->dev, "setup: unsupported %d bit words\n", 623 dev_dbg(&spi->dev, "setup: unsupported %d bit words\n",
626 spi->bits_per_word); 624 spi->bits_per_word);
627 return -EINVAL; 625 return -EINVAL;