All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 2/4] ASoC: Intel: bytcht_es8316: fix kernel oops with platform_name override
Date: Tue,  4 Jun 2019 15:08:56 -0500	[thread overview]
Message-ID: <20190604200858.4867-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20190604200858.4867-1-pierre-louis.bossart@linux.intel.com>

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: e4bc6b1195f64 ("ASoC: Intel: bytcht_es8316: platform name fixup support")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcht_es8316.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 1f319b2a835f..ba4830b7a161 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -488,6 +488,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 	}
 
 	/* override plaform name, if required */
+	byt_cht_es8316_card.dev = dev;
 	platform_name = mach->mach_params.platform;
 
 	ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_es8316_card,
@@ -568,7 +569,6 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 		 (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "mono" : "stereo",
 		 mic_name[BYT_CHT_ES8316_MAP(quirk)]);
 	byt_cht_es8316_card.long_name = long_name;
-	byt_cht_es8316_card.dev = dev;
 	snd_soc_card_set_drvdata(&byt_cht_es8316_card, priv);
 
 	ret = devm_snd_soc_register_card(dev, &byt_cht_es8316_card);
-- 
2.20.1

  parent reply	other threads:[~2019-06-04 20:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 20:08 [PATCH 0/4] ASoC: Intel: fix kernel oops in machine drivers Pierre-Louis Bossart
2019-06-04 20:08 ` [PATCH 1/4] ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override Pierre-Louis Bossart
2019-06-06 21:27   ` Applied "ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override" to the asoc tree Mark Brown
2019-06-04 20:08 ` Pierre-Louis Bossart [this message]
2019-06-06 21:27   ` Applied "ASoC: Intel: bytcht_es8316: " Mark Brown
2019-06-04 20:08 ` [PATCH 3/4] ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override Pierre-Louis Bossart
2019-06-06 21:27   ` Applied "ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override" to the asoc tree Mark Brown
2019-06-04 20:08 ` [PATCH 4/4] ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override Pierre-Louis Bossart
2019-06-06 21:27   ` Applied "ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190604200858.4867-3-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.