diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-26 17:18:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 16:53:40 -0400 |
commit | 79dedbddd0eea471d78ef82eb7c42b8fb1bdef65 (patch) | |
tree | 66da17240e6d63a1bcb3cf6766abc4befba7d6db | |
parent | b5da83d4a9c929ac197313b5d6c5d771447fb59e (diff) |
misc: eeprom: clean up eeprom_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>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/eeprom/eeprom.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index b432873def96..7342fd637031 100644 --- a/drivers/misc/eeprom/eeprom.c +++ b/drivers/misc/eeprom/eeprom.c | |||
@@ -88,11 +88,6 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, | |||
88 | struct eeprom_data *data = i2c_get_clientdata(client); | 88 | struct eeprom_data *data = i2c_get_clientdata(client); |
89 | u8 slice; | 89 | u8 slice; |
90 | 90 | ||
91 | if (off > EEPROM_SIZE) | ||
92 | return 0; | ||
93 | if (off + count > EEPROM_SIZE) | ||
94 | count = EEPROM_SIZE - off; | ||
95 | |||
96 | /* Only refresh slices which contain requested bytes */ | 91 | /* Only refresh slices which contain requested bytes */ |
97 | for (slice = off >> 5; slice <= (off + count - 1) >> 5; slice++) | 92 | for (slice = off >> 5; slice <= (off + count - 1) >> 5; slice++) |
98 | eeprom_update_client(client, slice); | 93 | eeprom_update_client(client, slice); |