]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Fix put_device() inconsistency in error path
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 6 Jul 2022 12:02:25 +0000 (14:02 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 9 Jul 2022 16:39:23 +0000 (18:39 +0200)
commitdc922e306cd0ceeeacc91b3b507600477597f144
tree4620207134290ff1b11baaf99d7ecbf06757ad8b
parent8920275c6448e6001060e6f6cb29658fea4a1e92
ALSA: hda: Fix put_device() inconsistency in error path

AVS HDAudio bus driver does not tie with codec drivers tighly. Codec
device and its respective driver cleanup procedures are split and may
not occur one after the other. Device cleanup is performed only on
snd_hdac_ext_bus_device_remove() i.e. it's the bus driver's
responsibility. If codec component probing fails, put_device() found in
snd_hda_codec_device_new() may lead to page fault. Relocate it to
snd_hda_codec_new() to address the problem on ASoC side while keeping
status quo for snd_hda_intel.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220706120230.427296-5-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c