summaryrefslogtreecommitdiff
path: root/drivers/char/generic_nvram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/generic_nvram.c')
-rw-r--r--drivers/char/generic_nvram.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c
index 0e941b57482e..6c4f4b5a9dd3 100644
--- a/drivers/char/generic_nvram.c
+++ b/drivers/char/generic_nvram.c
@@ -34,12 +34,16 @@ static ssize_t nvram_len;
static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
switch (origin) {
+ case 0:
+ break;
case 1:
offset += file->f_pos;
break;
case 2:
offset += nvram_len;
break;
+ default:
+ offset = -1;
}
if (offset < 0)
return -EINVAL;