Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100330
b: refs/heads/master
c: 864fe51
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 4a23b46 commit 324bb0a
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 2861ead38b8a376888c3f63b9c8e45d4cee02117
refs/heads/master: 864fe51671c9e44fb9d02765623daac9acc26a8b
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/apm_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
#include <linux/module.h>

#include <linux/poll.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/timer.h>
Expand Down Expand Up @@ -1544,10 +1545,12 @@ static int do_open(struct inode *inode, struct file *filp)
{
struct apm_user *as;

lock_kernel();
as = kmalloc(sizeof(*as), GFP_KERNEL);
if (as == NULL) {
printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n",
sizeof(*as));
unlock_kernel();
return -ENOMEM;
}
as->magic = APM_BIOS_MAGIC;
Expand All @@ -1569,6 +1572,7 @@ static int do_open(struct inode *inode, struct file *filp)
user_list = as;
spin_unlock(&user_list_lock);
filp->private_data = as;
unlock_kernel();
return 0;
}

Expand Down

0 comments on commit 324bb0a

Please sign in to comment.