diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-02-27 06:56:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 19:12:38 +0100 |
commit | ff9c351f96168a90d5a8239c350b565059e68be1 (patch) | |
tree | e4290f81908ba5b779821523740894c06a8040a2 /drivers/misc/apds990x.c | |
parent | misc/vmw_vmci: Add dependency on CONFIG_NET (diff) | |
download | linux-ff9c351f96168a90d5a8239c350b565059e68be1.tar.xz linux-ff9c351f96168a90d5a8239c350b565059e68be1.zip |
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 '')
-rw-r--r-- | 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 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, if (strict_strtoul(buf, 0, &value)) return -EINVAL; - if (chip->lux_calib > APDS_RANGE) - return -EINVAL; - chip->lux_calib = value; return len; |