aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/container.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-19 15:56:11 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 16:54:54 -0500
commit36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch)
treed9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/container.c
parent5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (diff)
ACPI: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r--drivers/acpi/container.c3
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);