ACPI: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Burman Yan
2006-12-19 12:56:11 -08:00
committed by Len Brown
parent 5b7b411955
commit 36bcbec7ce
22 changed files with 38 additions and 80 deletions

View File

@@ -221,10 +221,9 @@ static int acpi_ac_add(struct acpi_device *device)
if (!device)
return -EINVAL;
ac = kmalloc(sizeof(struct acpi_ac), GFP_KERNEL);
ac = kzalloc(sizeof(struct acpi_ac), GFP_KERNEL);
if (!ac)
return -ENOMEM;
memset(ac, 0, sizeof(struct acpi_ac));
ac->device = device;
strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);