diff options
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r-- | drivers/acpi/container.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index a15381789462..0a1863ec91f3 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -96,11 +96,10 @@ static int acpi_container_add(struct acpi_device *device) | |||
96 | return -EINVAL; | 96 | return -EINVAL; |
97 | } | 97 | } |
98 | 98 | ||
99 | container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); | 99 | container = kzalloc(sizeof(struct acpi_container), GFP_KERNEL); |
100 | if (!container) | 100 | if (!container) |
101 | return -ENOMEM; | 101 | return -ENOMEM; |
102 | 102 | ||
103 | memset(container, 0, sizeof(struct acpi_container)); | ||
104 | container->handle = device->handle; | 103 | container->handle = device->handle; |
105 | strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME); | 104 | strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME); |
106 | strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS); | 105 | strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS); |