Skip to content

Commit

Permalink
ASoC: Intel: bxt_da7219_max98357a: Fix kernel ops due to COMP_DUMMY c…
Browse files Browse the repository at this point in the history
…hange

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: thesofproject#4759 (comment)
Fixes: 13f5826 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed Jan 8, 2024
1 parent 0dde40e commit f80fc5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/intel/boards/bxt_da7219_max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,9 @@ static int broxton_audio_probe(struct platform_device *pdev)
broxton_audio_card.name = "glkda7219max";
/* Fixup the SSP entries for geminilake */
for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
if (!broxton_dais[i].codecs->dai_name)
continue;

/* MAXIM_CODEC is connected to SSP1. */
if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_MAXIM_CODEC_DAI)) {
Expand All @@ -822,6 +825,9 @@ static int broxton_audio_probe(struct platform_device *pdev)
broxton_audio_card.name = "cmlda7219max";

for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
if (!broxton_dais[i].codecs->dai_name)
continue;

/* MAXIM_CODEC is connected to SSP1. */
if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_MAXIM_CODEC_DAI)) {
Expand Down

0 comments on commit f80fc5c

Please sign in to comment.