diff options
Diffstat (limited to 'drivers/acpi/ibm_acpi.c')
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 130cc8c37e22..0e7682a88aa8 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -2516,13 +2516,12 @@ static int __init register_driver(struct ibm_struct *ibm) | |||
2516 | { | 2516 | { |
2517 | int ret; | 2517 | int ret; |
2518 | 2518 | ||
2519 | ibm->driver = kmalloc(sizeof(struct acpi_driver), GFP_KERNEL); | 2519 | ibm->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL); |
2520 | if (!ibm->driver) { | 2520 | if (!ibm->driver) { |
2521 | printk(IBM_ERR "kmalloc(ibm->driver) failed\n"); | 2521 | printk(IBM_ERR "kmalloc(ibm->driver) failed\n"); |
2522 | return -1; | 2522 | return -1; |
2523 | } | 2523 | } |
2524 | 2524 | ||
2525 | memset(ibm->driver, 0, sizeof(struct acpi_driver)); | ||
2526 | sprintf(ibm->driver->name, "%s_%s", IBM_NAME, ibm->name); | 2525 | sprintf(ibm->driver->name, "%s_%s", IBM_NAME, ibm->name); |
2527 | ibm->driver->ids = ibm->hid; | 2526 | ibm->driver->ids = ibm->hid; |
2528 | ibm->driver->ops.add = &ibm_device_add; | 2527 | ibm->driver->ops.add = &ibm_device_add; |