diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-12-05 20:08:00 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-12-07 18:09:39 +0100 |
commit | f1a70bac90cafd1b20a747b6dcc49d3a79050626 (patch) | |
tree | da9207cba3d93aae8058d71f429bd929035cf653 /drivers/acpi | |
parent | be5c8a046caaa295b6151b7a6653070ff8119ac2 (diff) |
ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_perflib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 7b6fa1b27afb..970f04a958cd 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -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; } |