ASoC: simple-card: fix a bug where cinfo will be NULL before using it
[platform/kernel/linux-stable.git] / sound / soc / generic / simple-card.c
index 0430be8..6c61b17 100644 (file)
@@ -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) {