aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-02-27 00:56:16 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 14:12:38 -0400
commitff9c351f96168a90d5a8239c350b565059e68be1 (patch)
treee4290f81908ba5b779821523740894c06a8040a2 /drivers/misc
parentd87c3f057922e616c0449aac518da200355c84e9 (diff)
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). Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/apds990x.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 0e67f8263cd8..1efb6a4ea397 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,
700 if (strict_strtoul(buf, 0, &value)) 700 if (strict_strtoul(buf, 0, &value))
701 return -EINVAL; 701 return -EINVAL;
702 702
703 if (chip->lux_calib > APDS_RANGE)
704 return -EINVAL;
705
706 chip->lux_calib = value; 703 chip->lux_calib = value;
707 704
708 return len; 705 return len;