Skip to content

Commit b9f58d3

Browse files
FirstLoveLifectmarinas
authored andcommitted
ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled
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 <[email protected]> Acked-by: Hanjun Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 19272b3 commit b9f58d3

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
@@ -1503,7 +1503,7 @@ int acpi_parse_spcr(bool enable_earlycon, bool enable_console);
15031503
#else
15041504
static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_console)
15051505
{
1506-
return 0;
1506+
return -ENODEV;
15071507
}
15081508
#endif
15091509

0 commit comments

Comments
 (0)