summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Chen <chenl311@chinatelecom.cn>2025-06-20 21:13:07 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-20 18:30:58 +0200
commite67d015b3732a349763978dbf40b88ca562d3390 (patch)
tree615874e127041229fc66b1a81c02ff43b1aa92f5
parent25ae311e322dd7eb4a1a0978426620aae81700e1 (diff)
ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled
commit b9f58d3572a8e1ef707b941eae58ec4014b9269d upstream. If CONFIG_ACPI_SPCR_TABLE is disabled, acpi_parse_spcr() currently returns 0, which may incorrectly suggest that SPCR parsing was successful. This patch changes the behavior to return -ENODEV to clearly indicate that SPCR support is not available. This prepares the codebase for future changes that depend on acpi_parse_spcr() failure detection, such as suppressing misleading console messages. Signed-off-by: Li Chen <chenl311@chinatelecom.cn> Acked-by: Hanjun Guo <guohanjun@huawei.com> Link: https://lore.kernel.org/r/20250620131309.126555-2-me@linux.beauty Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/linux/acpi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f826bb59556a..0e8d684ad9f4 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1472,7 +1472,7 @@ int acpi_parse_spcr(bool enable_earlycon, bool enable_console);
#else
static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_console)
{
- return 0;
+ return -ENODEV;
}
#endif