diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-27 00:18:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 23:53:40 +0300 |
commit | 2664e0386e813158b599a73164f8f7ddb2b0eb6d (patch) | |
tree | 302dd1a1c76a393f4b8bfd826208bd02852d20c9 /drivers/misc/eeprom | |
parent | 79dedbddd0eea471d78ef82eb7c42b8fb1bdef65 (diff) | |
download | linux-2664e0386e813158b599a73164f8f7ddb2b0eb6d.tar.xz |
misc: eeprom: max6875: clean up max6875_read()
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r-- | drivers/misc/eeprom/max6875.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c index 580ff9df5529..9aa4332a6b04 100644 --- a/drivers/misc/eeprom/max6875.c +++ b/drivers/misc/eeprom/max6875.c @@ -114,12 +114,6 @@ static ssize_t max6875_read(struct file *filp, struct kobject *kobj, struct max6875_data *data = i2c_get_clientdata(client); int slice, max_slice; - if (off > USER_EEPROM_SIZE) - return 0; - - if (off + count > USER_EEPROM_SIZE) - count = USER_EEPROM_SIZE - off; - /* refresh slices which contain requested bytes */ max_slice = (off + count - 1) >> SLICE_BITS; for (slice = (off >> SLICE_BITS); slice <= max_slice; slice++) |