diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-19 21:56:11 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 22:54:54 +0100 |
commit | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch) | |
tree | d9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/thermal.c | |
parent | Pull sgi into test branch (diff) | |
download | linux-36bcbec7ce21e2e8b3143b11a05747330abeca70.tar.xz linux-36bcbec7ce21e2e8b3143b11a05747330abeca70.zip |
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/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 4d75085ca2d2..40ddb4dd9631 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -902,12 +902,10 @@ acpi_thermal_write_trip_points(struct file *file, int i = 0; - limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); + limit_string = kzalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); if (!limit_string) return -ENOMEM; - memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); - active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); if (!active) { kfree(limit_string); @@ -1271,10 +1269,9 @@ static int acpi_thermal_add(struct acpi_device *device) if (!device) return -EINVAL; - tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL); + tz = kzalloc(sizeof(struct acpi_thermal), GFP_KERNEL); if (!tz) return -ENOMEM; - memset(tz, 0, sizeof(struct acpi_thermal)); tz->device = device; strcpy(tz->name, device->pnp.bus_id); |