From 708ec0241c56b85176937e79314430f4f71e40c6 Mon Sep 17 00:00:00 2001
From: Xiubo Li
Date: Thu, 9 Jan 2014 17:19:08 +0800
Subject: [PATCH] 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
---
sound/soc/generic/simple-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {