Message ID | 1421684575-6679-1-git-send-email-wsa@the-dreams.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 2541f7f4c14e2198ed8d8c61c854b86cae238cf1 |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Hi Wolfram, Thank you for the patch. On Monday 19 January 2015 17:22:55 Wolfram Sang wrote: > From: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Due to a copy&paste error, the last byte of the shared memory was not > accessible via sysfs. > > Reported-by: Debora Grosse <debora@mds.com> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/i2c/i2c-slave-eeprom.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c > index f432f81b0414..8f417e9054ac 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 struct eeprom_data *eeprom; > unsigned long flags; > > - if (off + count >= attr->size) > + if (off + count > attr->size) > return -EFBIG; > > 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 struct eeprom_data *eeprom; > unsigned long flags; > > - if (off + count >= attr->size) > + if (off + count > attr->size) > return -EFBIG; > > eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj));
On Mon, Jan 19, 2015 at 05:22:55PM +0100, Wolfram Sang wrote: > From: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Due to a copy&paste error, the last byte of the shared memory was not > accessible via sysfs. > > Reported-by: Debora Grosse <debora@mds.com> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Applied to for-current, thanks!
diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c index f432f81b0414..8f417e9054ac 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 struct eeprom_data *eeprom; unsigned long flags; - if (off + count >= attr->size) + if (off + count > attr->size) return -EFBIG; 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 struct eeprom_data *eeprom; unsigned long flags; - if (off + count >= attr->size) + if (off + count > attr->size) return -EFBIG; eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj));