ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override
[sfrench/cifs-2.6.git] / sound / soc / intel / boards / cht_bsw_max98090_ti.c
index c0e0844f75b9fe891fc7352c25e957c800f5e4b6..572e336ae0f96487e3ab43dede25c29aae6a8dff 100644 (file)
@@ -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)