diff options
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 10720a0388464..f8a95939c88d5 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -928,8 +928,10 @@ static int acpi_thermal_add(struct acpi_device *device) acpi_thermal_guess_offset(tz, crit_temp); trip = kcalloc(trip_count, sizeof(*trip), GFP_KERNEL); - if (!trip) - return -ENOMEM; + if (!trip) { + result = -ENOMEM; + goto free_memory; + } tz->trip_table = trip; |