lkml.org 
[lkml]   [2022]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Asoc: au1x: Use devm_snd_soc_register_component()
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().
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-03-01 14:28    [W:0.035 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site