diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-19 15:56:11 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 16:54:54 -0500 |
commit | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch) | |
tree | d9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/scan.c | |
parent | 5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (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/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 698a1540e303..283d87522c5d 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -984,12 +984,11 @@ acpi_add_single_object(struct acpi_device **child, | |||
984 | if (!child) | 984 | if (!child) |
985 | return -EINVAL; | 985 | return -EINVAL; |
986 | 986 | ||
987 | device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); | 987 | device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL); |
988 | if (!device) { | 988 | if (!device) { |
989 | printk(KERN_ERR PREFIX "Memory allocation error\n"); | 989 | printk(KERN_ERR PREFIX "Memory allocation error\n"); |
990 | return -ENOMEM; | 990 | return -ENOMEM; |
991 | } | 991 | } |
992 | memset(device, 0, sizeof(struct acpi_device)); | ||
993 | 992 | ||
994 | device->handle = handle; | 993 | device->handle = handle; |
995 | device->parent = parent; | 994 | device->parent = parent; |