All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: omap-100k: Fix the length judgment problem
@ 2021-04-29 11:20 Tian Tao
  2021-05-11  8:25 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-04-29 11:20 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, Tian Tao

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(-)

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;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: omap-100k: Fix the length judgment problem
  2021-04-29 11:20 [PATCH] spi: omap-100k: Fix the length judgment problem Tian Tao
@ 2021-05-11  8:25 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-05-11  8:25 UTC (permalink / raw)
  To: Tian Tao; +Cc: Mark Brown, linux-spi

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 11:20 [PATCH] spi: omap-100k: Fix the length judgment problem Tian Tao
2021-05-11  8:25 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.