diff mbox

ASoC: sti_uniperif: Ensure component is unregistered when unload module

Message ID 1440860792.28601.0.camel@ingics.com (mailing list archive)
State Accepted
Commit e12909107c30efccf570ac67802df5d2eec4cabd
Headers show

Commit Message

Axel Lin Aug. 29, 2015, 3:06 p.m. UTC
Use devm_snd_soc_register_component to ensure component is unregistered
when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/sti/sti_uniperif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index dffabf3..39bcefe 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -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;