aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/nvram.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-07-18 13:21:39 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 20:47:58 -0400
commit22735068d53c7115e384bc88dea95b17e76a6839 (patch)
treec531b0ca2ccf472c8abfede626535fcf07357624 /drivers/char/nvram.c
parent06222e491e663dac939f04b125c9dc52126a75c4 (diff)
drivers: fix up various ->llseek() implementations
Fix up a few ->llseek() implementations that won't deal with SEEK_HOLE/SEEK_DATA properly. Make them future proof so that if we ever add new options they will return -EINVAL. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/char/nvram.c')
-rw-r--r--drivers/char/nvram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 166f1e7aaa7..da3cfee782d 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -224,6 +224,8 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
case 2:
offset += NVRAM_BYTES;
break;
+ default:
+ return -EINVAL;
}
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;