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/thermal.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/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, | |||
902 | int i = 0; | 902 | int i = 0; |
903 | 903 | ||
904 | 904 | ||
905 | limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); | 905 | limit_string = kzalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); |
906 | if (!limit_string) | 906 | if (!limit_string) |
907 | return -ENOMEM; | 907 | return -ENOMEM; |
908 | 908 | ||
909 | memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); | ||
910 | |||
911 | active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); | 909 | active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); |
912 | if (!active) { | 910 | if (!active) { |
913 | kfree(limit_string); | 911 | kfree(limit_string); |
@@ -1271,10 +1269,9 @@ static int acpi_thermal_add(struct acpi_device *device) | |||
1271 | if (!device) | 1269 | if (!device) |
1272 | return -EINVAL; | 1270 | return -EINVAL; |
1273 | 1271 | ||
1274 | tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL); | 1272 | tz = kzalloc(sizeof(struct acpi_thermal), GFP_KERNEL); |
1275 | if (!tz) | 1273 | if (!tz) |
1276 | return -ENOMEM; | 1274 | return -ENOMEM; |
1277 | memset(tz, 0, sizeof(struct acpi_thermal)); | ||
1278 | 1275 | ||
1279 | tz->device = device; | 1276 | tz->device = device; |
1280 | strcpy(tz->name, device->pnp.bus_id); | 1277 | strcpy(tz->name, device->pnp.bus_id); |