Patch "spi: omap-100k: Fix the length judgment problem" has been added to the 5.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-omap-100k-fix-the-length-judgment-problem.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7817d239735ca92f910f8a8ca78edafd255ae5ae
Author: Tian Tao <tiantao6@xxxxxxxxxxxxx>
Date:   Thu Apr 29 19:20:48 2021 +0800

    spi: omap-100k: Fix the length judgment problem
    
    [ Upstream commit e7a1a3abea373e41ba7dfe0fbc93cb79b6a3a529 ]
    
    word_len should be checked in the omap1_spi100k_setup_transfer
    function to see if it exceeds 32.
    
    Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1619695248-39045-1-git-send-email-tiantao6@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index ccd817ee4917..0d0cd061d356 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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux