Skip to content

Commit

Permalink
ACPI: processor_throttling: Remove redundant initialization of 'obj'
Browse files Browse the repository at this point in the history
'obj' is being initialized, however this value is never read as
'obj' is assigned an updated value later. Remove the redundant
initialization.

Clean up clang warning:
drivers/acpi/processor_throttling.c:409:20: warning: Value stored to
'obj' during its initialization is never read
[clang-analyzer-deadcode.DeadStores]

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Yang Li authored and Rafael J. Wysocki committed Jun 14, 2021
1 parent 65ea8f2 commit 69530b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
acpi_status status = 0;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *ptc = NULL;
union acpi_object obj = { 0 };
union acpi_object obj;
struct acpi_processor_throttling *throttling;

status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer);
Expand Down

0 comments on commit 69530b4

Please sign in to comment.