diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-19 12:56:11 -0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 16:54:54 -0500 |
commit | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch) | |
tree | d9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/i2c_ec.c | |
parent | 5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (diff) | |
download | linux-36bcbec7ce21e2e8b3143b11a05747330abeca70.tar.bz2 |
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/i2c_ec.c')
-rw-r--r-- | drivers/acpi/i2c_ec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/i2c_ec.c b/drivers/acpi/i2c_ec.c index 82e3e64483fb..8338be0990bc 100644 --- a/drivers/acpi/i2c_ec.c +++ b/drivers/acpi/i2c_ec.c @@ -309,18 +309,16 @@ static int acpi_ec_hc_add(struct acpi_device *device) return -EINVAL; } - ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); + ec_hc = kzalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); if (!ec_hc) { return -ENOMEM; } - memset(ec_hc, 0, sizeof(struct acpi_ec_hc)); - smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); + smbus = kzalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); if (!smbus) { kfree(ec_hc); return -ENOMEM; } - memset(smbus, 0, sizeof(struct acpi_ec_smbus)); ec_hc->handle = device->handle; strcpy(acpi_device_name(device), ACPI_EC_HC_DEVICE_NAME); |