Skip to content

Commit 368604c

Browse files
jonhunterrafaeljw
authored andcommitted
ACPI: APEI: EINJ: Fix probe error message
Commit 6cb9441 ("ACPI: APEI: EINJ: Transition to the faux device interface") updated the APEI error injection driver to use the faux device interface and now for devices that don't support ACPI, the following error message is seen on boot: ERR KERN faux acpi-einj: probe did not succeed, tearing down the device The APEI error injection driver returns -ENODEV in the probe function if ACPI is not supported and so after transitioning the driver to the faux device interface, the error returned from the probe now causes the above error message to be displayed. Fix this by moving the code that detects if ACPI is supported to the einj_init() function to fix the false error message displayed for devices that don't support ACPI. Fixes: 6cb9441 ("ACPI: APEI: EINJ: Transition to the faux device interface") Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://patch.msgid.link/20250501124621.1251450-1-jonathanh@nvidia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6cb9441 commit 368604c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/acpi/apei/einj-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,6 @@ static int __init einj_probe(struct faux_device *fdev)
755755
acpi_status status;
756756
struct apei_exec_context ctx;
757757

758-
if (acpi_disabled) {
759-
pr_debug("ACPI disabled.\n");
760-
return -ENODEV;
761-
}
762-
763758
status = acpi_get_table(ACPI_SIG_EINJ, 0,
764759
(struct acpi_table_header **)&einj_tab);
765760
if (status == AE_NOT_FOUND) {
@@ -886,6 +881,11 @@ static struct faux_device_ops einj_device_ops __refdata = {
886881

887882
static int __init einj_init(void)
888883
{
884+
if (acpi_disabled) {
885+
pr_debug("ACPI disabled.\n");
886+
return -ENODEV;
887+
}
888+
889889
einj_dev = faux_device_create("acpi-einj", NULL, &einj_device_ops);
890890
if (!einj_dev)
891891
return -ENODEV;

0 commit comments

Comments
 (0)