浏览代码

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 <vz@mleia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Vladimir Zapolskiy 10 年之前
父节点
当前提交
d12c0aaf37
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      drivers/misc/eeprom/at24.c

+ 0 - 3
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;
 	struct at24_data *at24;
 
 
-	if (unlikely(off >= attr->size))
-		return -EFBIG;
-
 	at24 = dev_get_drvdata(container_of(kobj, struct device, kobj));
 	at24 = dev_get_drvdata(container_of(kobj, struct device, kobj));
 	return at24_write(at24, buf, off, count);
 	return at24_write(at24, buf, off, count);
 }
 }