OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
029d32a
)
spi: omap-100k: Fix the length judgment problem
author
Tian Tao
<tiantao6@hisilicon.com>
Thu, 29 Apr 2021 11:20:48 +0000
(19:20 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 10 May 2021 12:17:17 +0000
(13:17 +0100)
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>
drivers/spi/spi-omap-100k.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-omap-100k.c
b/drivers/spi/spi-omap-100k.c
index
7062f29
..
f104470
100644
(file)
--- 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;