From ff9c351f96168a90d5a8239c350b565059e68be1 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 27 Feb 2013 13:56:16 +0800 Subject: 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 --- drivers/misc/apds990x.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/misc/apds990x.c') 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; -- cgit v1.2.3