Skip to content

Commit

Permalink
ASoC: sti_uniperif: Ensure component is unregistered when unload module
Browse files Browse the repository at this point in the history
Use devm_snd_soc_register_component to ensure component is unregistered
when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 30, 2015
1 parent 36cc093 commit e129091
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/sti/sti_uniperif.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ static int sti_uniperiph_probe(struct platform_device *pdev)

dev_set_drvdata(&pdev->dev, priv);

ret = snd_soc_register_component(&pdev->dev,
&sti_uniperiph_dai_component,
priv->dai, 1);
ret = devm_snd_soc_register_component(&pdev->dev,
&sti_uniperiph_dai_component,
priv->dai, 1);
if (ret < 0)
return ret;

Expand Down

0 comments on commit e129091

Please sign in to comment.