Use devm_snd_soc_register_component to ensure component is unregistered
when unload the module.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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;