From: Xiubo Li Date: Thu, 9 Jan 2014 09:19:08 +0000 (+0800) Subject: ASoC: simple-card: fix a bug where cinfo will be NULL before using it X-Git-Tag: firefly_0821_release~176^2~4492^2~11^2^2^7~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=708ec0241c56b85176937e79314430f4f71e40c6;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 0430be85f23c..6c61b1758f78 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -213,8 +213,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev) } } } else { - cinfo->snd_card.dev = &pdev->dev; cinfo = pdev->dev.platform_data; + cinfo->snd_card.dev = &pdev->dev; } if (!cinfo) {