From: Kuninori Morimoto Date: Fri, 8 Apr 2011 06:09:02 +0000 (+0900) Subject: ASoC: fsi: take care in failing case of dai register X-Git-Tag: MMI-PSA29.97-13-9~19774^2~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b5ec87d3e1bcfe56515e550e1c6c94db9ab928b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: fsi: take care in failing case of dai register Signed-off-by: Kuninori Morimoto Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 0c9997e2d8c0..8e51a6eafbc3 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1218,8 +1218,17 @@ static int fsi_probe(struct platform_device *pdev) goto exit_free_irq; } - return snd_soc_register_dais(&pdev->dev, fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai)); + ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai, + ARRAY_SIZE(fsi_soc_dai)); + if (ret < 0) { + dev_err(&pdev->dev, "cannot snd dai register\n"); + goto exit_snd_soc; + } + return ret; + +exit_snd_soc: + snd_soc_unregister_platform(&pdev->dev); exit_free_irq: free_irq(irq, master); exit_iounmap: