Skip to content

Commit

Permalink
misc: eeprom: at24: clean up at24_bin_write()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vzapolskiy authored and Wolfram Sang committed Jul 31, 2015
1 parent 1f02329 commit d12c0aa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/misc/eeprom/at24.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d12c0aa

Please sign in to comment.