diff options
Diffstat (limited to 'drivers/i2c/i2c-slave-eeprom.c')
-rw-r--r-- | drivers/i2c/i2c-slave-eeprom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c index 6631400b5f02..cf9b09db092f 100644 --- a/drivers/i2c/i2c-slave-eeprom.c +++ b/drivers/i2c/i2c-slave-eeprom.c | |||
@@ -74,7 +74,7 @@ static ssize_t i2c_slave_eeprom_bin_read(struct file *filp, struct kobject *kobj | |||
74 | struct eeprom_data *eeprom; | 74 | struct eeprom_data *eeprom; |
75 | unsigned long flags; | 75 | unsigned long flags; |
76 | 76 | ||
77 | if (off + count >= attr->size) | 77 | if (off + count > attr->size) |
78 | return -EFBIG; | 78 | return -EFBIG; |
79 | 79 | ||
80 | eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); | 80 | eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); |
@@ -92,7 +92,7 @@ static ssize_t i2c_slave_eeprom_bin_write(struct file *filp, struct kobject *kob | |||
92 | struct eeprom_data *eeprom; | 92 | struct eeprom_data *eeprom; |
93 | unsigned long flags; | 93 | unsigned long flags; |
94 | 94 | ||
95 | if (off + count >= attr->size) | 95 | if (off + count > attr->size) |
96 | return -EFBIG; | 96 | return -EFBIG; |
97 | 97 | ||
98 | eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); | 98 | eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); |