aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r--drivers/acpi/power.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 23a8a9295578..0ba7dfbbb2ee 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -532,10 +532,9 @@ static int acpi_power_add(struct acpi_device *device)
532 if (!device) 532 if (!device)
533 return -EINVAL; 533 return -EINVAL;
534 534
535 resource = kmalloc(sizeof(struct acpi_power_resource), GFP_KERNEL); 535 resource = kzalloc(sizeof(struct acpi_power_resource), GFP_KERNEL);
536 if (!resource) 536 if (!resource)
537 return -ENOMEM; 537 return -ENOMEM;
538 memset(resource, 0, sizeof(struct acpi_power_resource));
539 538
540 resource->device = device; 539 resource->device = device;
541 strcpy(resource->name, device->pnp.bus_id); 540 strcpy(resource->name, device->pnp.bus_id);