From: Mark Brown <broonie@kernel.org>
To: Zhen Ni <nizhen@uniontech.com>
Cc: lgirdwood@gmail.com, tiwai@suse.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Asoc: au1x: Use devm_snd_soc_register_component()
Date: Tue, 1 Mar 2022 13:28:21 +0000 [thread overview]
Message-ID: <Yh4fdXOUKNeV7Mi5@sirena.org.uk> (raw)
In-Reply-To: <20220301092322.5523-1-nizhen@uniontech.com>
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
On Tue, Mar 01, 2022 at 05:23:22PM +0800, Zhen Ni wrote:
> +++ b/sound/soc/au1x/psc-ac97.c
> @@ -411,7 +411,7 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - ret = snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
> + ret = devm_snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
> &wd->dai_drv, 1);
> if (ret)
> return ret;
> --
This introduces a double free since there is a remove() function which
calls snd_soc_unregister_component().
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-03-01 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 9:23 [PATCH] Asoc: au1x: Use devm_snd_soc_register_component() Zhen Ni
2022-03-01 13:28 ` Mark Brown [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=Yh4fdXOUKNeV7Mi5@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nizhen@uniontech.com \
--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