projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dc349e
)
spi: sprd: Make sure offset not equal to slave address size
author
Chunyan Zhang
<chunyan.zhang@unisoc.com>
Tue, 24 Aug 2021 07:02:11 +0000
(15:02 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 24 Aug 2021 18:15:05 +0000
(19:15 +0100)
The slave register offset shouldn't equal to the max slave address
which ADI can support to access.
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link:
https://lore.kernel.org/r/20210824070212.2089255-2-zhang.lyra@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sprd-adi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-sprd-adi.c
b/drivers/spi/spi-sprd-adi.c
index abdad1ea7b38b38317801a058ba9f1acd8d21114..06af519c0b219da6f4b74b584666b4d2694cf95a 100644
(file)
--- a/
drivers/spi/spi-sprd-adi.c
+++ b/
drivers/spi/spi-sprd-adi.c
@@
-119,7
+119,7
@@
struct sprd_adi {
static int sprd_adi_check_addr(struct sprd_adi *sadi, u32 reg)
{
- if (reg > ADI_SLAVE_ADDR_SIZE) {
+ if (reg >
=
ADI_SLAVE_ADDR_SIZE) {
dev_err(sadi->dev,
"slave address offset is incorrect, reg = 0x%x\n",
reg);