aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c3
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;