linux/sound
Guennadi Liakhovetski 98ff5c262f
ASoC: Intel: consistent HDMI codec probing code
Multiple Intel ASoC machine drivers repeat the same pattern in their
.late_probe() methods: they first check whether the common HDMI codec
driver is used, if not, they proceed by linking the legacy HDMI
driver to each HDMI port. While doing that they use some
inconsistent code:

1. after the loop they check, whether the list contained at least one
   element and if not, they return an error. However, the earlier
   code to use the common HDMI driver uses the first element of the
   same list without checking. To fix this we move the check to the
   top of the function.

2. some of those .late_probe() implementations execute code, only
   needed for the common HDMI driver, before checking, whether the
   driver is used. Move the code to after the check.

3. Some of those functions also perform a redundant initialisation of
   the "err" variable.

This patch fixes those issues.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200124213625.30186-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-27 17:52:11 +00:00
..
ac97
aoa ALSA: aoa: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
arm ASoC: pxa: remove snd_pcm_ops 2019-10-08 13:47:20 +01:00
atmel
core sound updates #2 for 5.5-rc1 2019-12-06 13:06:14 -08:00
drivers ALSA: aloop: Avoid pointer dereference before null-check 2019-11-27 12:16:00 +01:00
firewire Merge branch 'for-linus' into for-next 2019-11-07 16:27:55 +01:00
hda ALSA: hda: Modify stream stripe mask only when needed 2019-12-03 07:46:30 +01:00
i2c
isa ALSA: cs4236: fix error return comparison of an unsigned integer 2019-11-22 14:21:27 +01:00
mips ALSA: mips: Convert to the common vmalloc memalloc 2019-11-06 15:47:43 +01:00
oss compat_ioctl: remove translation for sound ioctls 2019-10-23 17:23:45 +02:00
parisc
pci ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms 2019-12-03 20:33:05 +01:00
pcmcia ALSA: pdaudiocf: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
ppc
sh ALSA: sh: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
soc ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00
sparc ALSA: sparc: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
spi
synth
usb ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling 2019-11-25 16:49:35 +01:00
x86 ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure 2019-10-25 14:43:23 +02:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00