linux-stable/sound
Takashi Iwai 39173303c8 ALSA: hda: Free card instance properly at probe errors
The recent change in hda-intel driver to allow repeated probes
surfaced a problem that has been hidden until; the probe process in
the work calls azx_free() at the error path, and this skips the card
free process that eventually releases codec instances.  As a result,
we get a kernel WARNING like:

  snd_hda_intel 0000:00:1f.3: Cannot probe codecs, giving up
  ------------[ cut here ]------------
  WARNING: CPU: 14 PID: 186 at sound/hda/hdac_bus.c:73
  ....

For fixing this, we need to call snd_card_free() instead of
azx_free().  Additionally, the device drvdata has to be cleared, as
the driver binding itself is still active.  Then the PM and other
driver callbacks will ignore the procedure.

Fixes: c0f1886de7 ("ALSA: hda: intel: Allow repeatedly probing on codec configuration errors")
Reported-and-tested-by: Scott Branden <scott.branden@broadcom.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/063e2397-7edb-5f48-7b0d-618b938d9dd8@broadcom.com
Link: https://lore.kernel.org/r/20211110194633.19098-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-10 20:47:34 +01:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel
core ALSA: memalloc: Remove a stale comment 2021-11-10 07:35:23 +01:00
drivers ALSA: pcsp: Make hrtimer forwarding more robust 2021-09-28 10:58:08 +02:00
firewire ALSA: firewire-motu: add support for MOTU Track 16 2021-11-08 13:49:27 +01:00
hda ASoC: Updates for v5.16 2021-11-01 16:58:27 +01:00
i2c ALSA: i2c: tea6330t: Remove redundant initialization of variable err 2021-06-12 09:32:14 +02:00
isa ALSA: gus: fix null pointer dereference on pointer block 2021-10-26 08:02:16 +02:00
mips ALSA: n64: check return value after calling platform_get_resource() 2021-06-12 09:31:13 +02:00
oss sound/oss/dmasound: Remove superfluous "break" 2021-05-27 08:24:23 +02:00
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci ALSA: hda: Free card instance properly at probe errors 2021-11-10 20:47:34 +01:00
pcmcia ALSA: vx: Manage vx_core object with devres 2021-07-19 16:17:09 +02:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-06-16 08:52:29 +02:00
sh
soc ASoC: Updates for v5.16 2021-11-01 16:58:27 +01:00
sparc ALSA: sparc: Fix assignment in if condition 2021-06-09 17:30:29 +02:00
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-09 07:18:50 +01:00
usb ALSA: usb-audio: Add quirk for Audient iD14 2021-11-02 17:19:26 +01:00
virtio ALSA: virtio: Replace zero-length array with flexible-array member 2021-09-30 13:47:57 +02:00
x86 ALSA: memalloc: Correctly name as WC 2021-08-04 08:07:58 +02:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c