mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
spi: omap-100k: Fix the length judgment problem
[ Upstream commit e7a1a3abea
]
word_len should be checked in the omap1_spi100k_setup_transfer
function to see if it exceeds 32.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1619695248-39045-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e812d75e75
commit
09ee6e2830
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue