ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 4 Jun 2019 20:08:58 +0000 (15:08 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 16:24:28 +0000 (17:24 +0100)
commit9bbc799318a34061703f2a980e2b6df7fc6760f0
tree3d04ecb424bb2522e6a421ef784587a228c6ba10
parent096701e8131425044d2054a0c210d6ea24ee7386
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>
sound/soc/intel/boards/cht_bsw_rt5672.c