diff mbox series

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

Message ID 1619695248-39045-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State Accepted
Commit e7a1a3abea373e41ba7dfe0fbc93cb79b6a3a529
Headers show
Series spi: omap-100k: Fix the length judgment problem | expand

Commit Message

Tian Tao April 29, 2021, 11:20 a.m. UTC
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>
---
 drivers/spi/spi-omap-100k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown May 11, 2021, 8:25 a.m. UTC | #1
On Thu, 29 Apr 2021 19:20:48 +0800, Tian Tao wrote:
> word_len should be checked in the omap1_spi100k_setup_transfer
> function to see if it exceeds 32.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: omap-100k: Fix the length judgment problem
      commit: e7a1a3abea373e41ba7dfe0fbc93cb79b6a3a529

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index 7062f29..f104470 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -241,7 +241,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;