From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@codeaurora.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Venkata Prasad Potturu <quic_potturu@quicinc.com>,
Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: codecs: Fix an error handling path in va_macro_probe()
Date: Sun, 3 Apr 2022 08:17:21 +0200 [thread overview]
Message-ID: <7dc70fe2-a418-9842-c9ad-e78216ec1d13@wanadoo.fr> (raw)
In-Reply-To: <6d08311472e272fdc1a184f019ec98ade6e9dc46.1648966195.git.christophe.jaillet@wanadoo.fr>
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@wanadoo.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;
> }
>
prev parent reply other threads:[~2022-04-03 6:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-03 6:10 [PATCH] ASoC: codecs: Fix an error handling path in va_macro_probe() Christophe JAILLET
2022-04-03 6:17 ` Christophe JAILLET [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7dc70fe2-a418-9842-c9ad-e78216ec1d13@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=quic_potturu@quicinc.com \
--cc=quic_srivasam@quicinc.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).