The change removes redundant sysfs binary file boundary checks, since
this task is already done on caller side in fs/sysfs/file.c

Signed-off-by: Vladimir Zapolskiy <[email protected]>
Cc: [email protected]
Cc: Maxime Ripard <[email protected]>
---
 drivers/misc/eeprom/sunxi_sid.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/misc/eeprom/sunxi_sid.c b/drivers/misc/eeprom/sunxi_sid.c
index 8385177..26ce99d 100644
--- a/drivers/misc/eeprom/sunxi_sid.c
+++ b/drivers/misc/eeprom/sunxi_sid.c
@@ -70,11 +70,6 @@ static ssize_t sid_read(struct file *fd, struct kobject 
*kobj,
        pdev = to_platform_device(kobj_to_dev(kobj));
        sid_data = platform_get_drvdata(pdev);
 
-       if (pos < 0 || pos >= sid_data->keysize)
-               return 0;
-       if (size > sid_data->keysize - pos)
-               size = sid_data->keysize - pos;
-
        for (i = 0; i < size; i++)
                buf[i] = sunxi_sid_read_byte(sid_data, pos + i);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to