]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Make the v850 leds driver's seek routine always return a value
authorMiles Bader <miles@lsi.nec.co.jp>
Tue, 26 Nov 2002 13:21:06 +0000 (05:21 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 26 Nov 2002 13:21:06 +0000 (05:21 -0800)
Make the v850 leds driver's seek routine always return a value

arch/v850/kernel/rte_cb_leds.c

index f27350a10d1fd5e783412419bb419c39669b8ff0..deb27be112874f2bae424aa16a891323d0abfbf8 100644 (file)
@@ -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 = {