lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 3 Apr 2022 08:17:21 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Banajit Goswami <bgoswami@...eaurora.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Venkata Prasad Potturu <quic_potturu@...cinc.com>,
        Srinivasa Rao Mandadapu <quic_srivasam@...cinc.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        alsa-devel@...a-project.org
Subject: Re: [PATCH] ASoC: codecs: Fix an error handling path in
 va_macro_probe()

Le 03/04/2022 à 08:10, Christophe JAILLET a écrit :
> After a successful lpass_macro_pds_init() call, lpass_macro_pds_exit() must
> be called.
> 
> Add the missing call in the error handling path of the probe function and
> use it.
> 
> Fixes: 9e3d83c52844 ("ASoC: codecs: Add power domains support in digital macro codecs")

I'll send a V2. The same issue is also in lpass-tx-macro.c and 
lpass-rx-macro.c.

CJ

> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>   sound/soc/codecs/lpass-va-macro.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
> index f3cb596058e0..d18b56e60433 100644
> --- a/sound/soc/codecs/lpass-va-macro.c
> +++ b/sound/soc/codecs/lpass-va-macro.c
> @@ -1434,8 +1434,10 @@ static int va_macro_probe(struct platform_device *pdev)
>   		va->dmic_clk_div = VA_MACRO_CLK_DIV_2;
>   	} else {
>   		ret = va_macro_validate_dmic_sample_rate(sample_rate, va);
> -		if (!ret)
> -			return -EINVAL;
> +		if (!ret) {
> +			ret = -EINVAL;
> +			goto err;
> +		}
>   	}
>   
>   	base = devm_platform_ioremap_resource(pdev, 0);
> @@ -1492,6 +1494,8 @@ static int va_macro_probe(struct platform_device *pdev)
>   err_dcodec:
>   	clk_disable_unprepare(va->macro);
>   err:
> +	lpass_macro_pds_exit(va->pds);
> +
>   	return ret;
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ