[PATCH] drivers/misc: beautify code: chip->lux_calib is u16 whichwill never more than APDS_RANGE

From: Chen Gang
Date: Wed Feb 27 2013 - 00:56:54 EST



APDS_RANGE is 65535, chip->lux_calib is u16 (never more than APDS_RANGE).

Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx>
---
drivers/misc/apds990x.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 0e67f82..1efb6a4 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -700,9 +700,6 @@ static ssize_t apds990x_lux_calib_store(struct device *dev,
if (strict_strtoul(buf, 0, &value))
return -EINVAL;

- if (chip->lux_calib > APDS_RANGE)
- return -EINVAL;
-
chip->lux_calib = value;

return len;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/