ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 4 Jun 2019 20:08:55 +0000 (15:08 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 16:23:18 +0000 (17:23 +0100)
commitfb54555134b9b17835545e4d096b5550c27eed64
tree81498f33ac9fe51bb5fb1b04b1c7d8634292600c
parentf9927000cb35f250051f0f1878db12ee2626eea1
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>
sound/soc/intel/boards/cht_bsw_max98090_ti.c