From: Vladimir Zapolskiy Date: Sun, 26 Jul 2015 21:18:51 +0000 (+0300) Subject: misc: eeprom: at24: clean up at24_bin_write() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d12c0aaf3780c5b26b4ea9e795252381f586c063;p=openwrt%2Fstaging%2Fblogic.git misc: eeprom: at24: clean up at24_bin_write() The change removes redundant sysfs binary file boundary check, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy Signed-off-by: Wolfram Sang --- diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 2d3db81be099..6ded3dc36644 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -438,9 +438,6 @@ static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj, { struct at24_data *at24; - if (unlikely(off >= attr->size)) - return -EFBIG; - at24 = dev_get_drvdata(container_of(kobj, struct device, kobj)); return at24_write(at24, buf, off, count); }