linux-stable/sound
Douglas Anderson 96ba1e20e2 ASoC: rt5682: Properly turn off regulators if wrong device ID
[ Upstream commit 772d44526e ]

When I booted up on a board that had a slightly different codec
stuffed on it, I got this message at bootup:

  rt5682 9-001a: Device with ID register 6749 is not rt5682

That's normal/expected, but what wasn't normal was the splat that I
got after:

  WARNING: CPU: 7 PID: 176 at drivers/regulator/core.c:2151 _regulator_put+0x150/0x158
  pc : _regulator_put+0x150/0x158
  ...
  Call trace:
   _regulator_put+0x150/0x158
   regulator_bulk_free+0x48/0x70
   devm_regulator_bulk_release+0x20/0x2c
   release_nodes+0x1cc/0x244
   devres_release_all+0x44/0x60
   really_probe+0x17c/0x378
   ...

This is because the error paths don't turn off the regulator. Let's
fix that.

Fixes: 0ddce71c21 ("ASoC: rt5682: add rt5682 codec driver")
Fixes: 87b42abae9 ("ASoC: rt5682: Implement remove callback")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20210811081751.v2.1.I4a1d9aa5d99e05aeee15c2768db600158d76cab8@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:39 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-07-20 16:05:40 +02:00
aoa
arm
atmel
core ALSA: pcm: fix divide error in snd_pcm_lib_ioctl 2021-09-08 08:49:01 +02:00
drivers ALSA: aloop: Fix initialization of controls 2021-04-14 08:41:56 +02:00
firewire ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol 2021-07-20 16:05:45 +02:00
hda ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID 2021-07-28 14:35:40 +02:00
i2c
isa ALSA: sb: Fix potential ABBA deadlock in CSP driver 2021-07-28 14:35:42 +02:00
mips
oss
parisc
pci ALSA: hda/realtek: Workaround for conflicting SSID on ASUS ROG Strix G17 2021-09-08 08:49:01 +02:00
pcmcia
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:05:43 +02:00
sh
soc ASoC: rt5682: Properly turn off regulators if wrong device ID 2021-09-15 09:50:39 +02:00
sparc
spi
synth
usb ALSA: usb-audio: Add registration quirk for JBL Quantum 800 2021-09-12 08:58:27 +02:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c