提交 708ec024 编写于 作者: X Xiubo Li 提交者: Mark Brown

ASoC: simple-card: fix a bug where cinfo will be NULL before using it

If the dt is not used, the cinfo will be always NULL before using it.
Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 8c0b8230
...@@ -213,8 +213,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev) ...@@ -213,8 +213,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
} }
} }
} else { } else {
cinfo->snd_card.dev = &pdev->dev;
cinfo = pdev->dev.platform_data; cinfo = pdev->dev.platform_data;
cinfo->snd_card.dev = &pdev->dev;
} }
if (!cinfo) { if (!cinfo) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册