diff mbox series

[2/2] ASoC: amd: Return -ENODEV for non-existing ACPI call

Message ID 20201127143200.16272-3-tiwai@suse.de (mailing list archive)
State Accepted
Commit ab5893fdc0693e4f747ef26194b6bbf628bdb044
Headers show
Series ASoC: amd: Minor fixes for error handling | expand

Commit Message

Takashi Iwai Nov. 27, 2020, 2:31 p.m. UTC
AMD Renoir driver tries to identify the presence of DMIC by evaluating
ACPI _WOV entry, and it returns -EINVAL when the ACPI call failed.
This ended up an error message like
  snd_rn_pci_acp3x: probe of 0000:04:00.5 failed with error -22
although the system is correctly set up.

For avoiding such a superfluous error message, change the return value
to -ENODEV.  Then the driver core just skips to the next one without
complaining.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210359
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c
index b943e59fc302..877350f38a68 100644
--- a/sound/soc/amd/renoir/rn-pci-acp3x.c
+++ b/sound/soc/amd/renoir/rn-pci-acp3x.c
@@ -224,7 +224,7 @@  static int snd_rn_acp_probe(struct pci_dev *pci,
 		handle = ACPI_HANDLE(&pci->dev);
 		ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
 		if (ACPI_FAILURE(ret)) {
-			ret = -EINVAL;
+			ret = -ENODEV;
 			goto de_init;
 		}
 		if (!dmic_status) {