Hi Wolfram,

Thank you for the patch.

On Monday 19 January 2015 17:22:55 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+rene...@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 <deb...@mds.com>
> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com>

Acked-by: Laurent Pinchart <laurent.pinch...@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));

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to