alistair23-linux/sound
Takashi Iwai 2393e7555b ALSA: hda: Release resources at error in delayed probe
snd-hda-intel driver handles the most of its probe task in the delayed
work (either via workqueue or via firmware loader).  When an error
happens in the later delayed probe, we can't deregister the device
itself because the probe callback already returned success and the
device was bound.  So, for now, we set hda->init_failed flag and make
the rest untouched until the device gets really unbound.
However, this leaves the device up running, keeping the resources
without any use that prevents other operations.

In this patch, we release the resources at first when a probe error
happens in the delayed probe stage, but keeps the top-level object, so
that the PM and other ops can still refer to the object itself.

Also for simplicity, snd_hda_intel object is allocated via devm, so
that we can get rid of the explicit kfree calls.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
Link: https://lore.kernel.org/r/20200413082034.25166-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-13 18:02:36 +02:00
..
ac97
aoa
arm ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer 2020-03-27 14:44:56 +00:00
atmel
core ALSA: pcm: oss: Fix regression by buffer overflow fix (again) 2020-04-03 09:38:50 +02:00
drivers ALSA: dummy: Use standard macros for fixing PCM format cast 2020-02-10 08:27:31 +01:00
firewire ALSA: firewire-tascam: Add missing annotation for tscm_hwdep_read_locked() 2020-03-11 07:55:38 +01:00
hda ALSA: hda: Use scnprintf() for string truncation 2020-03-13 15:59:04 +01:00
i2c
isa ALSA: emu8000: Fix the cast to __user pointer 2020-02-10 08:26:38 +01:00
mips ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions 2020-03-06 12:06:41 +01:00
oss
parisc
pci ALSA: hda: Release resources at error in delayed probe 2020-04-13 18:02:36 +02:00
pcmcia
ppc ALSA: ppc: keywest: convert to use i2c_new_client_device() 2020-03-27 09:33:01 +01:00
sh
soc ASoC: cs4270: pull reset GPIO low then high 2020-04-07 15:29:54 +01:00
sparc
spi
synth
usb ALSA: usb-audio: Check mapping at creating connector controls, too 2020-04-12 10:14:54 +02:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c