Commit d4b1dfa6 authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

[PATCH] Make the v850 leds driver's seek routine always return a value

Make the v850 leds driver's seek routine always return a value
parent bbd128b7
......@@ -109,10 +109,12 @@ static loff_t leds_dev_lseek (struct file *file, loff_t offs, int whence)
else if (whence == 2)
offs += LED_NUM_DIGITS; /* end-relative */
if (offs >= 0 && offs <= LED_NUM_DIGITS)
file->f_pos = offs;
else
if (offs < 0 || offs > LED_NUM_DIGITS)
return -EINVAL;
file->f_pos = offs;
return 0;
}
static struct file_operations leds_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment