From: Axel Lin Date: Sat, 29 Aug 2015 15:06:32 +0000 (+0800) Subject: ASoC: sti_uniperif: Ensure component is unregistered when unload module X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e12909107c30efccf570ac67802df5d2eec4cabd;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ASoC: sti_uniperif: Ensure component is unregistered when unload module Use devm_snd_soc_register_component to ensure component is unregistered when unload the module. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c index dffabf3ba9fb..39bcefe5eea0 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;