aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-06-04 20:08:55 (GMT)
committerMark Brown <broonie@kernel.org>2019-06-06 16:23:18 (GMT)
commitfb54555134b9b17835545e4d096b5550c27eed64 (patch)
tree81498f33ac9fe51bb5fb1b04b1c7d8634292600c /sound
parentf9927000cb35f250051f0f1878db12ee2626eea1 (diff)
downloadkernel_replicant_linux-fb54555134b9b17835545e4d096b5550c27eed64.zip
kernel_replicant_linux-fb54555134b9b17835545e4d096b5550c27eed64.tar.gz
kernel_replicant_linux-fb54555134b9b17835545e4d096b5550c27eed64.tar.bz2
ASoC: Intel: cht_bsw_max98090: 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: 7e7e24d7c7ff0 ("ASoC: Intel: cht_bsw_max98090_ti: 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_max98090_ti.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index c0e0844..572e336 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -454,6 +454,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
}
/* override plaform name, if required */
+ snd_soc_card_cht.dev = &pdev->dev;
mach = (&pdev->dev)->platform_data;
platform_name = mach->mach_params.platform;
@@ -463,7 +464,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
return ret_val;
/* register the soc card */
- snd_soc_card_cht.dev = &pdev->dev;
snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
if (drv->quirks & QUIRK_PMC_PLT_CLK_0)