ACPI: fix memory leak in acpi_thermal_add() error path
authorVasily Averin <vvs@sw.ru>
Thu, 27 Apr 2006 09:25:00 +0000 (05:25 -0400)
committerLen Brown <len.brown@intel.com>
Sun, 14 May 2006 03:43:39 +0000 (23:43 -0400)
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/thermal.c

index 19f3ea48475e369ec9ba1b39405e5d14da9a2e6f..82389b1781300ccd606916600f839b9544010b9b 100644 (file)
@@ -1342,7 +1342,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);