diff options
| -rw-r--r-- | drivers/i2c/busses/i2c-qup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index c9d5f788e36b..ee409803fd94 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c | |||
| @@ -633,12 +633,12 @@ static int qup_i2c_probe(struct platform_device *pdev) | |||
| 633 | * associated with each byte written/received | 633 | * associated with each byte written/received |
| 634 | */ | 634 | */ |
| 635 | size = QUP_OUTPUT_BLOCK_SIZE(io_mode); | 635 | size = QUP_OUTPUT_BLOCK_SIZE(io_mode); |
| 636 | if (size > ARRAY_SIZE(blk_sizes)) | 636 | if (size >= ARRAY_SIZE(blk_sizes)) |
| 637 | return -EIO; | 637 | return -EIO; |
| 638 | qup->out_blk_sz = blk_sizes[size] / 2; | 638 | qup->out_blk_sz = blk_sizes[size] / 2; |
| 639 | 639 | ||
| 640 | size = QUP_INPUT_BLOCK_SIZE(io_mode); | 640 | size = QUP_INPUT_BLOCK_SIZE(io_mode); |
| 641 | if (size > ARRAY_SIZE(blk_sizes)) | 641 | if (size >= ARRAY_SIZE(blk_sizes)) |
| 642 | return -EIO; | 642 | return -EIO; |
| 643 | qup->in_blk_sz = blk_sizes[size] / 2; | 643 | qup->in_blk_sz = blk_sizes[size] / 2; |
| 644 | 644 | ||
