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: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Xiubo Li 2014-01-09 17:19:08 +08:00 committed by Mark Brown
parent 8c0b8230b2
commit 708ec0241c

View file

@ -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) {