diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/nvram.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 2100a8f7bd86..7cf4518c030f 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -329,14 +329,12 @@ static int nvram_ioctl(struct inode *inode, struct file *file, | |||
329 | 329 | ||
330 | static int nvram_open(struct inode *inode, struct file *file) | 330 | static int nvram_open(struct inode *inode, struct file *file) |
331 | { | 331 | { |
332 | lock_kernel(); | ||
333 | spin_lock(&nvram_state_lock); | 332 | spin_lock(&nvram_state_lock); |
334 | 333 | ||
335 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || | 334 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || |
336 | (nvram_open_mode & NVRAM_EXCL) || | 335 | (nvram_open_mode & NVRAM_EXCL) || |
337 | ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) { | 336 | ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) { |
338 | spin_unlock(&nvram_state_lock); | 337 | spin_unlock(&nvram_state_lock); |
339 | unlock_kernel(); | ||
340 | return -EBUSY; | 338 | return -EBUSY; |
341 | } | 339 | } |
342 | 340 | ||
@@ -347,7 +345,6 @@ static int nvram_open(struct inode *inode, struct file *file) | |||
347 | nvram_open_cnt++; | 345 | nvram_open_cnt++; |
348 | 346 | ||
349 | spin_unlock(&nvram_state_lock); | 347 | spin_unlock(&nvram_state_lock); |
350 | unlock_kernel(); | ||
351 | 348 | ||
352 | return 0; | 349 | return 0; |
353 | } | 350 | } |