Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173195
b: refs/heads/master
c: 6783b9c
h: refs/heads/master
i:
  173193: 0c7b8ff
  173191: 3cb567c
v: v3
  • Loading branch information
Frederic Weisbecker authored and Thomas Gleixner committed Oct 14, 2009
1 parent b01beb7 commit 06e0652
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 205153aa40b7fb36dc7fe76c1798584ace55b288
refs/heads/master: 6783b9cd7104470a3afab51c205c5aea53a2858f
9 changes: 3 additions & 6 deletions trunk/drivers/char/generic_nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/miscdevice.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/nvram.h>
#ifdef CONFIG_PPC_PMAC
Expand All @@ -32,7 +31,6 @@ static ssize_t nvram_len;

static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
lock_kernel();
switch (origin) {
case 1:
offset += file->f_pos;
Expand All @@ -41,12 +39,11 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
offset += nvram_len;
break;
}
if (offset < 0) {
unlock_kernel();
if (offset < 0)
return -EINVAL;
}

file->f_pos = offset;
unlock_kernel();

return file->f_pos;
}

Expand Down

0 comments on commit 06e0652

Please sign in to comment.