[alsa-devel] [PATCH 04/16] ASoC: cirrus: use devm_snd_soc_register_component()

Mark Brown broonie at kernel.org
Mon Sep 10 16:06:58 CEST 2018


On Fri, Sep 07, 2018 at 01:01:05AM +0000, Kuninori Morimoto wrote:

> @@ -422,8 +420,6 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
>  {
>  	struct ep93xx_ac97_info	*info = platform_get_drvdata(pdev);
>  
> -	snd_soc_unregister_component(&pdev->dev);
> -
>  	/* disable the AC97 controller */
>  	ep93xx_ac97_write_reg(info, AC97GCR, 0);
>  

Similar ordering thing here - it's generally fine to convert to devm_ if
the unregister is the last thing in the remove function but otherwise
you need to be careful.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180910/e140679e/attachment.sig>


More information about the Alsa-devel mailing list