Skip to content

Commit 9368aa1

Browse files
Li Yangrafaeljw
authored andcommitted
APEI: GHES: correctly return NULL for ghes_get_devices()
Since 315bada ("EDAC: Check for GHES preference in the chipset-specific EDAC drivers"), vendor specific EDAC driver will not probe correctly when CONFIG_ACPI_APEI_GHES is enabled but no GHES device is present. Make ghes_get_devices() return NULL when the GHES device list is empty to fix the problem. Fixes: 9057a3f ("EDAC/ghes: Prepare to make ghes_edac a proper module") Signed-off-by: Li Yang <[email protected]> Reviewed-by: Tony Luck <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d38f6bc commit 9368aa1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/apei/ghes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,8 @@ struct list_head *ghes_get_devices(void)
15421542

15431543
pr_warn_once("Force-loading ghes_edac on an unsupported platform. You're on your own!\n");
15441544
}
1545+
} else if (list_empty(&ghes_devs)) {
1546+
return NULL;
15451547
}
15461548

15471549
return &ghes_devs;

0 commit comments

Comments
 (0)