diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2022-03-24 20:09:48 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-04-05 20:25:21 +0200 |
commit | bdff938d04409aba0e43e408ee47d45d1486b2ae (patch) | |
tree | 66838a39d4b32252b03e9ce1dd797d3101b95081 | |
parent | Linux 5.18-rc1 (diff) | |
download | linux-bdff938d04409aba0e43e408ee47d45d1486b2ae.tar.xz linux-bdff938d04409aba0e43e408ee47d45d1486b2ae.zip |
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>
-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; } |