X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Fapm.c;fp=arch%2Farm%2Fkernel%2Fapm.c;h=766b6c05c6db6a2cf9d97e4a0f8d4a84f475f63b;hp=33c55689f999ea3f7bcd6f4955d339b4d08fd343;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 33c55689f..766b6c05c 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -10,6 +10,7 @@ * [This document is available from Microsoft at: * http://www.microsoft.com/hwdev/busbios/amp_12.htm] */ +#include #include #include #include @@ -356,8 +357,10 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; - as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL); + as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); if (as) { + memset(as, 0, sizeof(*as)); + /* * XXX - this is a tiny bit broken, when we consider BSD * process accounting. If the device is opened by root, we