diff options
| author | Davidlohr Bueso <[email protected]> | 2022-03-24 19:09:48 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2022-04-05 18:25:21 +0000 |
| commit | bdff938d04409aba0e43e408ee47d45d1486b2ae (patch) | |
| tree | 66838a39d4b32252b03e9ce1dd797d3101b95081 | |
| parent | Linux 5.18-rc1 (diff) | |
| download | kernel-bdff938d04409aba0e43e408ee47d45d1486b2ae.tar.gz kernel-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 <[email protected]>
Acked-by: Zhang Rui <[email protected]>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
| -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; } |
