From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- v1 -> v2 - no change sound/soc/ux500/ux500_msp_dai.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index 35669b7..131f09e 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -800,7 +800,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev) } dev_set_drvdata(&pdev->dev, drvdata); - ret = snd_soc_register_component(&pdev->dev, &ux500_msp_component, + ret = devm_snd_soc_register_component(&pdev->dev, &ux500_msp_component, &ux500_msp_dai_drv, 1); if (ret < 0) { dev_err(&pdev->dev, "Error: %s: Failed to register MSP%d!\n", @@ -813,22 +813,16 @@ static int ux500_msp_drv_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Error: %s: Failed to register PCM platform device!\n", __func__); - goto err_reg_plat; + return ret; } return 0; - -err_reg_plat: - snd_soc_unregister_component(&pdev->dev); - return ret; } static int ux500_msp_drv_remove(struct platform_device *pdev) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev); - snd_soc_unregister_component(&pdev->dev); - prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s"); ux500_msp_i2s_cleanup_msp(pdev, drvdata->msp); -- 2.7.4 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel