diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-27 00:18:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 13:53:40 -0700 |
commit | 79dedbddd0eea471d78ef82eb7c42b8fb1bdef65 (patch) | |
tree | 66da17240e6d63a1bcb3cf6766abc4befba7d6db /drivers/misc | |
parent | b5da83d4a9c929ac197313b5d6c5d771447fb59e (diff) | |
download | linux-79dedbddd0eea471d78ef82eb7c42b8fb1bdef65.tar.gz linux-79dedbddd0eea471d78ef82eb7c42b8fb1bdef65.tar.bz2 linux-79dedbddd0eea471d78ef82eb7c42b8fb1bdef65.zip |
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>
Diffstat (limited to 'drivers/misc')
-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, struct eeprom_data *data = i2c_get_clientdata(client); u8 slice; - if (off > EEPROM_SIZE) - return 0; - if (off + count > EEPROM_SIZE) - count = EEPROM_SIZE - off; - /* Only refresh slices which contain requested bytes */ for (slice = off >> 5; slice <= (off + count - 1) >> 5; slice++) eeprom_update_client(client, slice); |