提交 ff9c351f 编写于 作者: C Chen Gang 提交者: Greg Kroah-Hartman

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: NChen Gang <gang.chen@asianux.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d87c3f05
...@@ -700,9 +700,6 @@ static ssize_t apds990x_lux_calib_store(struct device *dev, ...@@ -700,9 +700,6 @@ static ssize_t apds990x_lux_calib_store(struct device *dev,
if (strict_strtoul(buf, 0, &value)) if (strict_strtoul(buf, 0, &value))
return -EINVAL; return -EINVAL;
if (chip->lux_calib > APDS_RANGE)
return -EINVAL;
chip->lux_calib = value; chip->lux_calib = value;
return len; return len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册