diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2024-01-08 11:48:42 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-01-08 12:29:45 +0000 |
commit | 3ec71290db4de298b67659ef2bc2a8f84cf9537b (patch) | |
tree | 35a29711e8737cdac73688a2f5c2798d029d3b02 | |
parent | 59b946ea30806064c4ac78f0ac93642655dd4f2e (diff) | |
download | linux-stable-3ec71290db4de298b67659ef2bc2a8f84cf9537b.tar.gz linux-stable-3ec71290db4de298b67659ef2bc2a8f84cf9537b.tar.bz2 linux-stable-3ec71290db4de298b67659ef2bc2a8f84cf9537b.zip |
ASoC: Intel: bxt_rt298: Fix kernel ops due to COMP_DUMMY change
The change to avoid dummy components will leave the component name and
dai_name NULL which will cause NULL dereference when trying to access to
it in the machine driver when applying fixups.
Link: https://github.com/thesofproject/linux/pull/4759#issuecomment-1878641868
Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240108094842.28782-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/boards/bxt_rt298.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index 4631106f2a28..c0eb65c14aa9 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -604,7 +604,8 @@ static int broxton_audio_probe(struct platform_device *pdev) int i; for (i = 0; i < ARRAY_SIZE(broxton_rt298_dais); i++) { - if (!strncmp(card->dai_link[i].codecs->name, "i2c-INT343A:00", + if (card->dai_link[i].codecs->name && + !strncmp(card->dai_link[i].codecs->name, "i2c-INT343A:00", I2C_NAME_SIZE)) { if (!strncmp(card->name, "broxton-rt298", PLATFORM_NAME_SIZE)) { |