X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Fapm.c;h=2bed290fec76b4522bee0befb6812f141f82aaab;hb=f606a6ff222dc7dceeb4d0e214ce4f55d9c6b0e6;hp=b9df1b782bb1128b72b30739dbc92671d14c8d2e;hpb=115b2ce1c3b974e43e45fa6c9e20cd7271a01dff;p=linux-2.6 diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index b9df1b782b..2bed290fec 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -356,10 +357,8 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; - as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); + as = (struct apm_user *)kzalloc(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