mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ASoC: Intel: hdac_hdmi: Set ops to NULL on remove
[ Upstream commit 0f6ff78540 ]
When we unload Skylake driver we may end up calling
hdac_component_master_unbind(), it uses acomp->audio_ops, which we set
in hdmi_codec_probe(), so we need to set it to NULL in hdmi_codec_remove(),
otherwise we will dereference no longer existing pointer.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1182ff2248
commit
6e6bc34f85
@@ -1854,6 +1854,12 @@ static void hdmi_codec_remove(struct snd_soc_component *component)
|
||||
{
|
||||
struct hdac_hdmi_priv *hdmi = snd_soc_component_get_drvdata(component);
|
||||
struct hdac_device *hdev = hdmi->hdev;
|
||||
int ret;
|
||||
|
||||
ret = snd_hdac_acomp_register_notifier(hdev->bus, NULL);
|
||||
if (ret < 0)
|
||||
dev_err(&hdev->dev, "notifier unregister failed: err: %d\n",
|
||||
ret);
|
||||
|
||||
pm_runtime_disable(&hdev->dev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user