Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80ba2669 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card



If the card is not part of any card the tas_data->codec is NULL since it is
set only during snd_soc_codec_driver.probe, which is not yet called.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent ea178d14
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)
{
	u8 cfg1_reg;

	if (!tas_data->codec)
		return;

	if (sw_shutdown)
		cfg1_reg = 0;
	else