diff options
| author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-26 17:18:50 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 16:53:40 -0400 |
| commit | 2664e0386e813158b599a73164f8f7ddb2b0eb6d (patch) | |
| tree | 302dd1a1c76a393f4b8bfd826208bd02852d20c9 /drivers/misc/eeprom | |
| parent | 79dedbddd0eea471d78ef82eb7c42b8fb1bdef65 (diff) | |
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, | |||
| 114 | struct max6875_data *data = i2c_get_clientdata(client); | 114 | struct max6875_data *data = i2c_get_clientdata(client); |
| 115 | int slice, max_slice; | 115 | int slice, max_slice; |
| 116 | 116 | ||
| 117 | if (off > USER_EEPROM_SIZE) | ||
| 118 | return 0; | ||
| 119 | |||
| 120 | if (off + count > USER_EEPROM_SIZE) | ||
| 121 | count = USER_EEPROM_SIZE - off; | ||
| 122 | |||
| 123 | /* refresh slices which contain requested bytes */ | 117 | /* refresh slices which contain requested bytes */ |
| 124 | max_slice = (off + count - 1) >> SLICE_BITS; | 118 | max_slice = (off + count - 1) >> SLICE_BITS; |
| 125 | for (slice = (off >> SLICE_BITS); slice <= max_slice; slice++) | 119 | for (slice = (off >> SLICE_BITS); slice <= max_slice; slice++) |
