]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
APEI: GHES: correctly return NULL for ghes_get_devices()
authorLi Yang <leoyang.li@nxp.com>
Fri, 19 May 2023 20:12:49 +0000 (15:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:24 +0000 (19:39 +0200)
commit34f251a654ec1d4dda33ec5657378d8fd5fc9fb3
treea820211b7f04b8927d919bf03247948a9e1a7b80
parente068d5b7c51474eede346c786b5316328236b39f
APEI: GHES: correctly return NULL for ghes_get_devices()

[ Upstream commit 9368aa1882ac7178adcd936cee5f0899dbf76dc4 ]

Since 315bada690e0 ("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: 9057a3f7ac36 ("EDAC/ghes: Prepare to make ghes_edac a proper module")
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/apei/ghes.c