Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100329
b: refs/heads/master
c: 2861ead
h: refs/heads/master
i:
  100327: 8312038
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 7eab980 commit 4a23b46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b82829943c470e59cfd3ee84d8ed6ae5d5e1a55b
refs/heads/master: 2861ead38b8a376888c3f63b9c8e45d4cee02117
3 changes: 3 additions & 0 deletions trunk/drivers/char/apm-emulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/miscdevice.h>
Expand Down Expand Up @@ -416,6 +417,7 @@ static int apm_open(struct inode * inode, struct file * filp)
{
struct apm_user *as;

lock_kernel();
as = kzalloc(sizeof(*as), GFP_KERNEL);
if (as) {
/*
Expand All @@ -435,6 +437,7 @@ static int apm_open(struct inode * inode, struct file * filp)

filp->private_data = as;
}
unlock_kernel();

return as ? 0 : -ENOMEM;
}
Expand Down

0 comments on commit 4a23b46

Please sign in to comment.