diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index b8e201c09484..f64d030c760a 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -242,7 +242,7 @@ static int omap1_spi100k_setup_transfer(struct spi_device *spi, else word_len = spi->bits_per_word; - if (spi->bits_per_word > 32) + if (word_len > 32) return -EINVAL; cs->word_len = word_len;