linux/sound/soc
Guennadi Liakhovetski 478c9a9185 ASoC: Intel: consistent HDMI codec probing code
[ Upstream commit 98ff5c262f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2020-02-24 08:38:45 +01:00
..
adi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
amd ASoC: AMD: Enable clk in startup intead of hw_params 2019-11-27 12:50:08 +00:00
atmel ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m 2020-02-24 08:38:27 +01:00
au1x ASoC: Remove superfluous snd_dma_continuous_data() 2019-11-09 18:02:52 +01:00
bcm ASoC: bcm: cygnus-pcm: remove snd_pcm_ops 2019-10-08 13:49:12 +01:00
cirrus sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
codecs ASoC: wm_adsp: Correct cache handling of new kernel control API 2020-02-24 08:38:35 +01:00
dwc ASoC: Remove superfluous snd_dma_continuous_data() 2019-11-09 18:02:52 +01:00
fsl ASoC: fsl_audmix: add missed pm_runtime_disable 2019-12-24 23:56:18 +00:00
generic ASoC: simple-card: Don't create separate link when platform is present 2019-12-10 13:10:40 +00:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
img treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
intel ASoC: Intel: consistent HDMI codec probing code 2020-02-24 08:38:45 +01:00
jz4740 ASoC: jz4740: Remove unused match variable 2019-10-09 10:58:01 +01:00
kirkwood Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
mediatek ASoC: mediatek: Check SND_SOC_CROS_EC_CODEC dependency 2019-10-23 17:45:34 +01:00
meson ASoC: meson: axg-fifo: fix fifo threshold setup 2020-02-11 04:37:16 -08:00
mxs ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
pxa sound updates for 5.5-rc1 2019-11-26 20:04:35 -08:00
qcom ASoC: More updates for v5.5 2019-11-25 14:27:41 +01:00
rockchip ASoC: Fixes for v5.4 2019-11-07 13:52:17 +01:00
samsung sound updates for 5.5-rc1 2019-11-26 20:04:35 -08:00
sh ASoC: More updates for v5.5 2019-11-25 14:27:41 +01:00
sirf ASoC: sirf: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:05:39 +01:00
sof ASoC: SOF: Intel: hda: Fix SKL dai count 2020-02-24 08:38:35 +01:00
spear ASoC: spear: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:06:18 +01:00
sprd ASoC: sprd: sprd-pcm-dma: remove snd_pcm_ops 2019-10-08 13:44:40 +01:00
sti ASoC: sti: fix possible sleep-in-atomic 2020-01-13 15:12:26 +00:00
stm ASoC: stm32: dfsdm: fix 16 bits record 2020-01-10 13:30:10 +00:00
sunxi ASoC: sunxi: sun4i-codec: remove unneeded semicolon 2019-10-28 13:12:39 +00:00
tegra ASoC: tegra: Revert 24 and 32 bit support 2020-02-11 04:36:52 -08:00
ti ASoC: ti: davinci-mcasp: Use dma_request_chan() directly for channel request 2019-11-15 12:03:16 +00:00
txx9 ASoC: txx9: Remove unused rtd variable 2020-02-24 08:38:27 +01:00
uniphier ASoC: uniphier: aio-dma: remove snd_pcm_ops 2019-10-08 13:44:05 +01:00
ux500 ASoC: ux500: Remove redundant variable "status" 2019-11-04 13:22:25 +00:00
xilinx ASoC: Updates for v5.5 2019-11-07 14:12:30 +01:00
xtensa ASoC: xtensa: xtfpga-i2s: remove snd_pcm_ops 2019-10-08 13:43:25 +01:00
zte sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
Kconfig ASoC: remove w90x900/nuc900 platform drivers 2019-08-12 14:00:29 +01:00
Makefile ASoC: remove w90x900/nuc900 platform drivers 2019-08-12 14:00:29 +01:00
soc-ac97.c ASoC: ac97: convert to SPDX identifiers 2018-07-02 10:56:09 +01:00
soc-acpi.c ASoC: soc-acpi: fix implicit header use of module.h/export.h 2019-05-08 18:06:28 +09:00
soc-component.c ASoC: Fixes for v5.5 2020-01-16 14:14:26 +01:00
soc-compress.c ASoC: core: Init pcm runtime work early to avoid warnings 2019-12-04 11:15:30 +00:00
soc-core.c ASoC: core: Fix access to uninitialized list heads 2019-12-24 23:56:15 +00:00
soc-dai.c ASoC: soc-dai: move snd_soc_dai_stream_valid() to soc-dai.c 2019-07-23 18:14:26 +01:00
soc-dapm.c ASoC: soc-core: add snd_soc_dapm_init() 2019-09-02 13:21:20 +01:00
soc-devres.c ASoC: soc-devres.c: convert to SPDX identifiers 2018-07-02 10:55:22 +01:00
soc-generic-dmaengine-pcm.c ASoC: soc-generic-dmaengine-pcm: Fix error handling 2020-02-14 16:53:05 -05:00
soc-io.c ASoC: soc-io.c: convert to SPDX identifiers 2018-07-02 10:53:55 +01:00
soc-jack.c ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report 2019-11-12 17:12:56 +00:00
soc-ops.c ASoC: soc-ops: use snd_soc_card_get_kcontrol() at snd_soc_limit_volume() 2019-10-03 14:37:20 +01:00
soc-pcm.c ASoC: Fixes for v5.5 2019-12-17 14:18:32 +01:00
soc-topology.c ASoC: soc-topology: fix endianness issues 2020-02-24 08:38:21 +01:00
soc-utils.c ASoC: soc-utils: remove snd_pcm_ops 2019-10-08 13:50:43 +01:00