Skip to content

Commit f1a70ba

Browse files
committed
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 <[email protected]>
1 parent be5c8a0 commit f1a70ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/acpi/processor_perflib.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,12 @@ int acpi_processor_notify_smm(struct module *calling_module)
475475

476476
result = acpi_processor_pstate_control();
477477
if (result <= 0) {
478-
if (!result)
478+
if (result) {
479+
is_done = result;
480+
} else {
479481
pr_debug("No SMI port or pstate_control\n");
480-
481-
is_done = -EIO;
482+
is_done = 1;
483+
}
482484
goto out_put;
483485
}
484486

0 commit comments

Comments
 (0)