Skip to content

Commit e67d015

Browse files
FirstLoveLifegregkh
authored andcommitted
ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled
commit b9f58d3 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>
1 parent 25ae311 commit e67d015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@ int acpi_parse_spcr(bool enable_earlycon, bool enable_console);
14721472
#else
14731473
static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_console)
14741474
{
1475-
return 0;
1475+
return -ENODEV;
14761476
}
14771477
#endif
14781478

0 commit comments

Comments
 (0)