aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-06-04 20:08:58 (GMT)
committerMark Brown <broonie@kernel.org>2019-06-06 16:24:28 (GMT)
commit9bbc799318a34061703f2a980e2b6df7fc6760f0 (patch)
tree3d04ecb424bb2522e6a421ef784587a228c6ba10 /sound
parent096701e8131425044d2054a0c210d6ea24ee7386 (diff)
downloadkernel_replicant_linux-9bbc799318a34061703f2a980e2b6df7fc6760f0.zip
kernel_replicant_linux-9bbc799318a34061703f2a980e2b6df7fc6760f0.tar.gz
kernel_replicant_linux-9bbc799318a34061703f2a980e2b6df7fc6760f0.tar.bz2
ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override
The platform override code uses devm_ functions to allocate memory for the new name but the card device is not initialized. Fix by moving the init earlier. Fixes: f403906da05cd ("ASoC: Intel: cht_bsw_rt5672: platform name fixup support") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5672.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index 0f77708..1455e19 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -426,6 +426,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
}
/* override plaform name, if required */
+ snd_soc_card_cht.dev = &pdev->dev;
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht,
@@ -443,7 +444,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
/* register the soc card */
- snd_soc_card_cht.dev = &pdev->dev;
ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
if (ret_val) {
dev_err(&pdev->dev,