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 3/4] ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override
Date: Tue, 4 Jun 2019 15:08:57 -0500 [thread overview]
Message-ID: <20190604200858.4867-4-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: 4506db8043341 ("ASoC: Intel: cht_bsw_nau8824: platform name fixup support")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c
index 02c2fa239331..20fae391c75a 100644
--- a/sound/soc/intel/boards/cht_bsw_nau8824.c
+++ b/sound/soc/intel/boards/cht_bsw_nau8824.c
@@ -257,6 +257,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
/* override plaform name, if required */
+ snd_soc_card_cht.dev = &pdev->dev;
mach = (&pdev->dev)->platform_data;
platform_name = mach->mach_params.platform;
@@ -266,7 +267,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;
ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
if (ret_val) {
dev_err(&pdev->dev,
--
2.20.1
next prev 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 ` [PATCH 2/4] ASoC: Intel: bytcht_es8316: fix kernel oops with platform_name override Pierre-Louis Bossart
2019-06-06 21:27 ` Applied "ASoC: Intel: bytcht_es8316: 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: cht_bsw_nau8824: " 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-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).