From: Chen Gang Date: Wed, 27 Feb 2013 05:56:16 +0000 (+0800) Subject: drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE X-Git-Tag: v3.10-rc1~194^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff9c351f96168a90d5a8239c350b565059e68be1;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c index 0e67f8263cd..1efb6a4ea39 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;