Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff9c351f authored by Chen Gang's avatar Chen Gang Committed by Greg Kroah-Hartman
Browse files

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: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d87c3f05
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;