summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-05-24 22:09:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-27 14:49:39 +0200
commit7abdadfcf19a385b6f8ffea75457074240a9536f (patch)
tree9bf64795d45cc2f91f70251923fcef5863235a1d /drivers/misc/eeprom
parent7adbd54fb23b38fd7bc28f679445ae93d3846c40 (diff)
eeprom: ee1004: Remove not needed check in ee1004_read
sysfs_kf_bin_read() checks this for us already. In addition the function works correctly also w/o this check. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/33889bff-3614-4b73-5010-701635e1edab@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r--drivers/misc/eeprom/ee1004.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c
index 0613a530099c..6aff333ff049 100644
--- a/drivers/misc/eeprom/ee1004.c
+++ b/drivers/misc/eeprom/ee1004.c
@@ -97,9 +97,6 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
size_t requested = count;
int page;
- if (unlikely(!count))
- return count;
-
page = off >> EE1004_PAGE_SHIFT;
if (unlikely(page > 1))
return 0;