Skip to content

Commit 984795e

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: yc: Fix the wrong return value
With the current implementation, when ACP driver fails to read ACPI _WOV entry then the DMI overrides code won't invoke, may cause regressions for some BIOS versions. Add a condition check to jump to check the DMI entries incase of ACP driver fail to read ACPI _WOV method. Fixes: 4095cf8 (ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry) Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fac04ef commit 984795e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,14 +578,19 @@ static int acp6x_probe(struct platform_device *pdev)
578578

579579
handle = ACPI_HANDLE(pdev->dev.parent);
580580
ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
581-
if (!ACPI_FAILURE(ret))
581+
if (!ACPI_FAILURE(ret)) {
582582
wov_en = dmic_status;
583+
if (!wov_en)
584+
return -ENODEV;
585+
} else {
586+
/* Incase of ACPI method read failure then jump to check_dmi_entry */
587+
goto check_dmi_entry;
588+
}
583589

584-
if (is_dmic_enable && wov_en)
590+
if (is_dmic_enable)
585591
platform_set_drvdata(pdev, &acp6x_card);
586-
else
587-
return 0;
588592

593+
check_dmi_entry:
589594
/* check for any DMI overrides */
590595
dmi_id = dmi_first_match(yc_acp_quirk_table);
591596
if (dmi_id)

0 commit comments

Comments
 (0)