Skip to content

Commit

Permalink
greybus: gb-vibrator: remove useless if in timeout_store()
Browse files Browse the repository at this point in the history
val is an unsigned long so there is no point in checking if it is less
than zero.

Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
wfp5p authored and gregkh committed Jan 16, 2015
1 parent c86117a commit 4e2b07e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/greybus/gb-vibrator.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ static ssize_t timeout_store(struct device *dev, struct device_attribute *attr,
return retval;
}

if (val < 0)
return -EINVAL;
if (val)
retval = turn_on(vib, (u16)val);
else
Expand Down

0 comments on commit 4e2b07e

Please sign in to comment.