Commit 708ec024 authored by Xiubo Li's avatar Xiubo Li Committed by 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: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment