Skip to content

Commit

Permalink
ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return v…
Browse files Browse the repository at this point in the history
…alue

Avoid returning a confusing error code from acpi_processor_notify_smm()
if it is called for the second time in the case when SMM notification
regarding P-state control is not supported.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Dec 7, 2022
1 parent be5c8a0 commit f1a70ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,12 @@ int acpi_processor_notify_smm(struct module *calling_module)

result = acpi_processor_pstate_control();
if (result <= 0) {
if (!result)
if (result) {
is_done = result;
} else {
pr_debug("No SMI port or pstate_control\n");

is_done = -EIO;
is_done = 1;
}
goto out_put;
}

Expand Down

0 comments on commit f1a70ba

Please sign in to comment.