diff options
| -rw-r--r-- | drivers/char/generic_nvram.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index ef31738c2cbe..fda4181b5e67 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #include <linux/miscdevice.h> | 19 | #include <linux/miscdevice.h> |
| 20 | #include <linux/fcntl.h> | 20 | #include <linux/fcntl.h> |
| 21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| 22 | #include <linux/smp_lock.h> | ||
| 23 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
| 24 | #include <asm/nvram.h> | 23 | #include <asm/nvram.h> |
| 25 | #ifdef CONFIG_PPC_PMAC | 24 | #ifdef CONFIG_PPC_PMAC |
| @@ -32,7 +31,6 @@ static ssize_t nvram_len; | |||
| 32 | 31 | ||
| 33 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | 32 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) |
| 34 | { | 33 | { |
| 35 | lock_kernel(); | ||
| 36 | switch (origin) { | 34 | switch (origin) { |
| 37 | case 1: | 35 | case 1: |
| 38 | offset += file->f_pos; | 36 | offset += file->f_pos; |
| @@ -41,12 +39,11 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | |||
| 41 | offset += nvram_len; | 39 | offset += nvram_len; |
| 42 | break; | 40 | break; |
| 43 | } | 41 | } |
| 44 | if (offset < 0) { | 42 | if (offset < 0) |
| 45 | unlock_kernel(); | ||
| 46 | return -EINVAL; | 43 | return -EINVAL; |
| 47 | } | 44 | |
| 48 | file->f_pos = offset; | 45 | file->f_pos = offset; |
| 49 | unlock_kernel(); | 46 | |
| 50 | return file->f_pos; | 47 | return file->f_pos; |
| 51 | } | 48 | } |
| 52 | 49 | ||
