Commit e7a1a3ab authored by Tian Tao's avatar Tian Tao Committed by Mark Brown

spi: omap-100k: Fix the length judgment problem

word_len should be checked in the omap1_spi100k_setup_transfer
function to see if it exceeds 32.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1619695248-39045-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 029d32a8
...@@ -241,7 +241,7 @@ static int omap1_spi100k_setup_transfer(struct spi_device *spi, ...@@ -241,7 +241,7 @@ static int omap1_spi100k_setup_transfer(struct spi_device *spi,
else else
word_len = spi->bits_per_word; word_len = spi->bits_per_word;
if (spi->bits_per_word > 32) if (word_len > 32)
return -EINVAL; return -EINVAL;
cs->word_len = word_len; cs->word_len = word_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment