Skip to contentSkip to conversation

drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE

PATCH New Chen Gang 1 participant 1 message Feb 27, 2013 Char and misc drivers

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE

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

---
 drivers/misc/apds990x.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/misc/apds990x.c +0 -3
index 0e67f82..1efb6a4 100644
@@ -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;
Signature · 1 line
1.7.7.6