diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2022-03-24 22:09:48 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-04-05 21:25:21 +0300 |
commit | bdff938d04409aba0e43e408ee47d45d1486b2ae (patch) | |
tree | 66838a39d4b32252b03e9ce1dd797d3101b95081 /drivers/thermal/intel | |
parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
download | linux-bdff938d04409aba0e43e408ee47d45d1486b2ae.tar.xz |
thermal: int340x: Clean up unnecessary acpi_buffer pointer freeing
It is the caller's responsibility to free only upon ACPI_SUCCESS.
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Acked-by: Zhang Rui <rui.zhang@intel.com>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/intel')
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 4954800b9850..0e7931c286ec 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -186,11 +186,11 @@ static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab ret = *((u32 *)(context.ret.pointer + 4)); if (ret != *enable) result = -EPERM; + + kfree(context.ret.pointer); } else result = -EPERM; - kfree(context.ret.pointer); - return result; } |