Skip to content

Commit

Permalink
drivers/misc: beautify code: chip->lux_calib is u16 which will never …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Chen Gang authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent d87c3f0 commit ff9c351
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/misc/apds990x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff9c351

Please sign in to comment.