提交 2cdcd951 编写于 作者: N Nicolas Ferre 提交者: Mark Brown

ASoC: atmel_ssc_dai: fix ssc error path

We do not have to free a resource that is not allocated yet.
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: NLiam Girdwood <lrg@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 97b4fc3c
......@@ -838,10 +838,8 @@ int atmel_ssc_set_audio(int ssc_id)
}
ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
if (!ssc_pdev) {
ssc_free(ssc);
if (!ssc_pdev)
return -ENOMEM;
}
/* If we can grab the SSC briefly to parent the DAI device off it */
ssc = ssc_request(ssc_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册