X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Fapm.c;h=2bed290fec76b4522bee0befb6812f141f82aaab;hb=f606a6ff222dc7dceeb4d0e214ce4f55d9c6b0e6;hp=766b6c05c6db6a2cf9d97e4a0f8d4a84f475f63b;hpb=0a0fc0ddbe732779366ab6b1b879f62195e65967;p=linux-2.6 diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 766b6c05c6..2bed290fec 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -357,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