Message ID | 20210824070212.2089255-2-zhang.lyra@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2b961c51f4d35c45116b21936b563cbb78fba540 |
Headers | show |
Series | [1/3] spi: sprd: Pass offset instead of physical address to adi_read/_write() | expand |
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index abdad1ea7b38..06af519c0b21 100644 --- 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);