Re: [PATCH] ASoC: amd: yc: Fix the wrong return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> Add a condition check to jump to check the DMI entries
> incase of ACP driver fail to read ACPI _WOV method.

  in case?             failure?


…
> +++ b/sound/soc/amd/yc/acp6x-mach.c
> @@ -578,14 +578,19 @@ static int acp6x_probe(struct platform_device *pdev)
>
>  	handle = ACPI_HANDLE(pdev->dev.parent);
>  	ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
> -	if (!ACPI_FAILURE(ret))
> +	if (!ACPI_FAILURE(ret)) {
>  		wov_en = dmic_status;
> +		if (!wov_en)
> +			return -ENODEV;
> +	} else {
> +		/* Incase of ACPI method read failure then jump to check_dmi_entry */
> +		goto check_dmi_entry;
> +	}
>
>  	if (is_dmic_enable && wov_en)
>  		platform_set_drvdata(pdev, &acp6x_card);
…

Is there a need to adjust another condition check accordingly?

Regards,
Markus




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux