Skip to content

Commit 59b946e

Browse files
ujfalusibroonie
authored andcommitted
ASoC: Intel: bxt_da7219_max98357a: 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: thesofproject/linux#4759 (comment) Fixes: 13f5826 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 15de2a2 commit 59b946e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/soc/intel/boards/bxt_da7219_max98357a.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,9 @@ static int broxton_audio_probe(struct platform_device *pdev)
797797
broxton_audio_card.name = "glkda7219max";
798798
/* Fixup the SSP entries for geminilake */
799799
for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
800+
if (!broxton_dais[i].codecs->dai_name)
801+
continue;
802+
800803
/* MAXIM_CODEC is connected to SSP1. */
801804
if (!strcmp(broxton_dais[i].codecs->dai_name,
802805
BXT_MAXIM_CODEC_DAI)) {
@@ -822,6 +825,9 @@ static int broxton_audio_probe(struct platform_device *pdev)
822825
broxton_audio_card.name = "cmlda7219max";
823826

824827
for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
828+
if (!broxton_dais[i].codecs->dai_name)
829+
continue;
830+
825831
/* MAXIM_CODEC is connected to SSP1. */
826832
if (!strcmp(broxton_dais[i].codecs->dai_name,
827833
BXT_MAXIM_CODEC_DAI)) {

0 commit comments

Comments
 (0)