diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-14 09:00:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-14 09:00:38 +0100 |
commit | e6cb9c167eeb8f90ab924666c573e69e85e700a0 (patch) | |
tree | 7ea46d78b06ce1ebdc05ea92faad03281b8162d1 /drivers/misc/eeprom | |
parent | 0580565dd717cb135633ebdbc1d84fe6b0a3fa78 (diff) | |
parent | 754e0b0e35608ed5206d6a67a791563c631cec07 (diff) |
Merge 5.17-rc4 into char-misc-next
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r-- | drivers/misc/eeprom/ee1004.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index bb9c4512c968..9fbfe784d710 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -114,6 +114,9 @@ static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf, if (offset + count > EE1004_PAGE_SIZE) count = EE1004_PAGE_SIZE - offset; + if (count > I2C_SMBUS_BLOCK_MAX) + count = I2C_SMBUS_BLOCK_MAX; + return i2c_smbus_read_i2c_block_data_or_emulated(client, offset, count, buf); } |