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-Url: https://git.stricted.de/?a=commitdiff_plain;h=708ec0241c56b85176937e79314430f4f71e40c6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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) {