]> err.no Git - linux-2.6/blobdiff - drivers/acpi/thermal.c
[PATCH] Correct tty doc
[linux-2.6] / drivers / acpi / thermal.c
index 928dcf9e77c7fcb66d179e8173f6c43d61687685..e7fe3a14fdafd46e88851f348657835555e7e484 100644 (file)
@@ -686,8 +686,7 @@ static void acpi_thermal_run(unsigned long data)
 {
        struct acpi_thermal *tz = (struct acpi_thermal *)data;
        if (!tz->zombie)
-               acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
-                                           acpi_thermal_check, (void *)data);
+               acpi_os_execute(OSL_GPE_HANDLER, acpi_thermal_check, (void *)data);
 }
 
 static void acpi_thermal_check(void *data)
@@ -944,8 +943,10 @@ acpi_thermal_write_trip_points(struct file *file,
        memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
 
        active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
-       if (!active)
+       if (!active) {
+               kfree(limit_string);
                return_VALUE(-ENOMEM);
+       }
 
        if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
@@ -1344,7 +1345,7 @@ static int acpi_thermal_add(struct acpi_device *device)
 
        result = acpi_thermal_add_fs(device);
        if (result)
-               return_VALUE(result);
+               goto end;
 
        init_timer(&tz->timer);