Skip to content

Commit b9c2db7

Browse files
Alex Chianglenb
authored andcommitted
ACPI: processor: open code acpi_processor_cleanup_pdc
We have the acpi_object_list * right there in acpi_processor_set_pdc() so it doesn't seem necessary for an entire helper function just to free it. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent fa11856 commit b9c2db7

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎drivers/acpi/processor_pdc.c‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,6 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
125125
return status;
126126
}
127127

128-
static void acpi_processor_cleanup_pdc(struct acpi_processor *pr)
129-
{
130-
if (pr->pdc) {
131-
kfree(pr->pdc->pointer->buffer.pointer);
132-
kfree(pr->pdc->pointer);
133-
kfree(pr->pdc);
134-
pr->pdc = NULL;
135-
}
136-
}
137-
138128
void acpi_processor_set_pdc(struct acpi_processor *pr)
139129
{
140130
struct acpi_object_list *obj_list;
@@ -147,7 +137,10 @@ void acpi_processor_set_pdc(struct acpi_processor *pr)
147137
return;
148138

149139
acpi_processor_eval_pdc(pr->handle, obj_list);
150-
acpi_processor_cleanup_pdc(pr);
140+
141+
kfree(obj_list->pointer->buffer.pointer);
142+
kfree(obj_list->pointer);
143+
kfree(obj_list);
151144
}
152145
EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);
153146

0 commit comments

Comments
 (0)