linux/sound/soc/intel
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
..
atom ASoC: Intel: sst: Add missing include <linux/io.h> 2019-12-03 12:16:19 +00:00
baytrail ASoC: intel: sst-baytrail-pcm: remove snd_pcm_ops 2019-10-08 13:42:11 +01:00
boards ASoC: Intel: consistent HDMI codec probing code 2020-02-24 08:38:45 +01:00
common ASoC: Intel: common: work-around incorrect ACPI HID for CML boards 2019-12-10 13:11:50 +00:00
haswell ASoC: intel: Drop superfluous snd_pcm_sgbuf_ops_page 2019-11-09 18:02:52 +01:00
skylake ASoC: intel: Avoid non-standard macro usage 2019-11-09 18:02:53 +01:00
Kconfig ASoC: Updates for v5.5 2019-11-07 14:12:30 +01:00
Makefile ASoC: Intel: Fix Kconfig with top-level selector 2018-01-08 16:18:48 +00:00