提交 80ba2669 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

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: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
上级 ea178d14
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册