mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
spi: sprd: Make sure offset not equal to slave address size
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>
This commit is contained in:
parent
5dc349ec13
commit
2b961c51f4
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue