Unverified Commit 8c41be25 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT

Merge series from Hans de Goede <hdegoede@redhat.com>:

While testing 6.8 on a Bay Trail device with a ALC5640 codec
I noticed a regression in 6.8 which causes a NULL pointer deref
in probe().

All BYT/CHT Intel machine drivers are affected. Patch 1/2 of
this series fixes all of them.

Patch 2/2 adds some small cleanups to cht_bsw_rt5645.c for
issues which I noticed while working on 1/2.
parents c4b603c6 930375d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -241,7 +241,8 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev)

	/* fix index of codec dai */
	for (i = 0; i < ARRAY_SIZE(byt_cht_cx2072x_dais); i++) {
		if (!strcmp(byt_cht_cx2072x_dais[i].codecs->name,
		if (byt_cht_cx2072x_dais[i].codecs->name &&
		    !strcmp(byt_cht_cx2072x_dais[i].codecs->name,
			    "i2c-14F10720:00")) {
			dai_index = i;
			break;
+2 −1
Original line number Diff line number Diff line
@@ -245,7 +245,8 @@ static int bytcht_da7213_probe(struct platform_device *pdev)

	/* fix index of codec dai */
	for (i = 0; i < ARRAY_SIZE(dailink); i++) {
		if (!strcmp(dailink[i].codecs->name, "i2c-DLGS7213:00")) {
		if (dailink[i].codecs->name &&
		    !strcmp(dailink[i].codecs->name, "i2c-DLGS7213:00")) {
			dai_index = i;
			break;
		}
+2 −1
Original line number Diff line number Diff line
@@ -546,7 +546,8 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)

	/* fix index of codec dai */
	for (i = 0; i < ARRAY_SIZE(byt_cht_es8316_dais); i++) {
		if (!strcmp(byt_cht_es8316_dais[i].codecs->name,
		if (byt_cht_es8316_dais[i].codecs->name &&
		    !strcmp(byt_cht_es8316_dais[i].codecs->name,
			    "i2c-ESSX8316:00")) {
			dai_index = i;
			break;
+2 −1
Original line number Diff line number Diff line
@@ -1652,7 +1652,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)

	/* fix index of codec dai */
	for (i = 0; i < ARRAY_SIZE(byt_rt5640_dais); i++) {
		if (!strcmp(byt_rt5640_dais[i].codecs->name,
		if (byt_rt5640_dais[i].codecs->name &&
		    !strcmp(byt_rt5640_dais[i].codecs->name,
			    "i2c-10EC5640:00")) {
			dai_index = i;
			break;
+2 −1
Original line number Diff line number Diff line
@@ -910,7 +910,8 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)

	/* fix index of codec dai */
	for (i = 0; i < ARRAY_SIZE(byt_rt5651_dais); i++) {
		if (!strcmp(byt_rt5651_dais[i].codecs->name,
		if (byt_rt5651_dais[i].codecs->name &&
		    !strcmp(byt_rt5651_dais[i].codecs->name,
			    "i2c-10EC5651:00")) {
			dai_index = i;
			break;
Loading