From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tian Tao <tiantao6@hisilicon.com>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
linux-spi@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 02/15] spi: omap-100k: Fix the length judgment problem
Date: Sun, 4 Jul 2021 19:12:08 -0400 [thread overview]
Message-ID: <20210704231222.1492037-2-sashal@kernel.org> (raw)
In-Reply-To: <20210704231222.1492037-1-sashal@kernel.org>
From: Tian Tao <tiantao6@hisilicon.com>
[ 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@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>
---
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 1eccdc4a4581..2eeb0fe2eed2 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -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;
--
2.30.2
next prev parent reply other threads:[~2021-07-04 23:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-04 23:12 [PATCH AUTOSEL 4.4 01/15] spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() Sasha Levin
2021-07-04 23:12 ` Sasha Levin [this message]
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 03/15] crypto: nx - add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 04/15] media: cpia2: fix memory leak in cpia2_usb_probe Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 05/15] media: pvrusb2: fix warning in pvr2_i2c_core_done Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 06/15] crypto: qat - check return code of qat_hal_rd_rel_reg() Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 07/15] crypto: qat - remove unused macro in FW loader Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 08/15] media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 09/15] media: bt8xx: Fix a missing check bug in bt878_probe Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 10/15] mmc: via-sdmmc: add a check against NULL pointer dereference Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 11/15] crypto: shash - avoid comparing pointers to exported functions under CFI Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 12/15] media: dvb_net: avoid speculation from net slot Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 13/15] btrfs: make Private2 lifespan more consistent Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 14/15] btrfs: disable build on platforms having page size 256K Sasha Levin
2021-07-04 23:12 ` [PATCH AUTOSEL 4.4 15/15] regulator: da9052: Ensure enough delay time for .set_voltage_time_sel Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210704231222.1492037-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiantao6@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®