linux-stable/sound
Hans de Goede f2973a1de9
ASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect()
sound/soc/soc-core.c: soc_remove_component() unconditionally calls
snd_soc_component_set_jack(component, NULL, NULL); on any components
being removed.

This means that on machines where the machine-driver does not provide
a jack through snd_soc_component_set_jack() es8316_disable_jack_detect()
will still get called and at this time es8316->jack will be NULL and
the es8316->jack->status check in es8316_disable_jack_detect() will
lead to a NULL pointer deref.

Fix this by checking for es8316->jack bein NULL at the start of
es8316_disable_jack_detect() and turn the function into a no-op in
that case.

Cc: russianneuromancer <russianneuromancer@ya.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210112101725.44200-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-12 14:12:02 +00:00
..
ac97
aoa
arm
atmel
core sound fixes for 5.11-rc1 2020-12-23 15:11:08 -08:00
drivers ALSA: aloop: Constify ops structs 2020-11-21 09:30:35 +01:00
firewire Merge branch 'topic/usb-audio-refactoring' into for-next 2020-11-24 09:13:00 +01:00
hda Auxiliary Bus support tag for 5.11-rc1 2020-12-04 20:39:45 +00:00
i2c
isa ALSA: sb: Fix fall-through warnings for Clang 2020-11-21 09:29:26 +01:00
mips
oss
parisc
pci ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G 2020-12-22 16:13:49 +01:00
pcmcia
ppc powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
sh
soc ASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect() 2021-01-12 14:12:02 +00:00
sparc ALSA: sparc: dbri: fix repeated word 'the' 2020-10-17 09:58:35 +02:00
spi
synth
usb ALSA: usb-audio: Add implicit feeback support for the BOSS GT-1 2020-12-22 09:25:14 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c