Skip to content

Commit

Permalink
ACPI: Remove redundant clearing of context->ret.pointer from acpi_run…
Browse files Browse the repository at this point in the history
…_osc()

context->ret.pointer already gets set to NULL at the beginning of
acpi_run_osc() and it only gets assigned a new value in the success
path near the end of acpi_run_osc(), so the clearing of
context->ret.pointer (when status != AE_OK) at the end of
acpi_run_osc() is redundant since it will always already be NULL when
status != AE_OK.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Hans de Goede authored and Rafael J. Wysocki committed Jun 10, 2021
1 parent 614124b commit f39de44
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)

out_kfree:
kfree(output.pointer);
if (status != AE_OK)
context->ret.pointer = NULL;
return status;
}
EXPORT_SYMBOL(acpi_run_osc);
Expand Down

0 comments on commit f39de44

Please sign in to comment.