aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index fba9c230a84d..a29af58cb4cd 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -941,8 +941,10 @@ acpi_thermal_write_trip_points(struct file *file,
941 memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); 941 memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
942 942
943 active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); 943 active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
944 if (!active) 944 if (!active) {
945 kfree(limit_string);
945 return_VALUE(-ENOMEM); 946 return_VALUE(-ENOMEM);
947 }
946 948
947 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) { 949 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
948 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n")); 950 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));