linux_dsm_epyc7002/sound/soc/intel/boards
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
..
bdw-rt5650.c ASoC: Intel: bdw-rt5650: change cpu_dai and platform components for SOF 2020-01-13 14:59:45 +00:00
bdw-rt5677.c ASoC: Intel: bdw-rt5677: change cpu_dai and platform components for SOF 2020-01-13 14:59:14 +00:00
broadwell.c ASoC: Intel: broadwell: change cpu_dai and platform components for SOF 2020-01-13 14:59:30 +00:00
bxt_da7219_max98357a.c ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00
bxt_rt298.c ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00
byt-max98090.c Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
byt-rt5640.c Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
bytcht_cx2072x.c gpiolib-acpi: Move acpi_dev_add_driver_gpios() et al to consumer.h 2019-07-31 00:59:19 +02:00
bytcht_da7213.c Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
bytcht_es8316.c ASoC: Intel: bytcht_es8316: removed unused variable 2020-01-14 15:30:47 +00:00
bytcht_nocodec.c Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
bytcr_rt5640.c ASoC: Intel: bytcr_rt5640: Remove unnecessary string buffers and snprintf calls 2020-01-17 15:41:57 +00:00
bytcr_rt5651.c ASoC: Intel: bytcr_rt5651: Remove unnecessary string buffers and snprintf calls 2020-01-17 15:42:01 +00:00
cht_bsw_max98090_ti.c sound updates for 5.4 2019-09-17 17:43:33 -07:00
cht_bsw_nau8824.c Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
cht_bsw_rt5645.c ASoC: Intel: cht_bsw_rt5645: Remove unnecessary string buffers and snprintf calls 2020-01-17 15:42:04 +00:00
cht_bsw_rt5672.c gpiolib-acpi: Move acpi_dev_add_driver_gpios() et al to consumer.h 2019-07-31 00:59:19 +02:00
cml_rt1011_rt5682.c ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00
glk_rt5682_max98357a.c ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00
haswell.c ASoC: Intel: haswell: Simplify device probe 2019-08-30 12:26:41 +01:00
hda_dsp_common.c ASoC: Intel: boards: hda_dsp_common: use NULL pointer assignment, not 0 2020-01-03 00:57:42 +00:00
hda_dsp_common.h ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi 2019-10-29 17:31:54 +00:00
kbl_da7219_max98357a.c ASoC: Intel: kbl_da7219_max98357a: rename shadowed variable 2020-01-14 15:27:55 +00:00
kbl_da7219_max98927.c ASoC: Intel: kbl_da7219_max98927: remove unnecessary initialization 2020-01-14 15:28:43 +00:00
kbl_rt5660.c ASoC: Intel: kbl_rt5660: rename shadowed variable 2020-01-14 15:28:58 +00:00
kbl_rt5663_max98927.c ASoC: Intel: kbl_rt5663_max98927: rename shadowed variable 2020-01-14 15:29:14 +00:00
kbl_rt5663_rt5514_max98927.c ASOC: Intel: kbl_rt5663_rt5514_max98927: remove useless initialization 2020-01-14 15:29:45 +00:00
Kconfig ASoC: Intel: bdw-rt5677: fix Kconfig dependencies 2020-01-13 14:59:05 +00:00
Makefile ASoC: intel: Add Broadwell rt5650 machine driver 2019-12-18 20:02:30 +00:00
skl_hda_dsp_common.c ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi 2019-10-29 17:31:54 +00:00
skl_hda_dsp_common.h ASoC: Intel: skl-hda-dsp-generic: fix include guard name 2019-10-29 17:31:59 +00:00
skl_hda_dsp_generic.c ASoC: intel/skl/hda - export number of digital microphones via control components 2019-12-09 18:36:52 +00:00
skl_nau88l25_max98357a.c ASoC: Intel: skl_nau88l25_max98357a: rename shadowed variable 2020-01-14 15:30:01 +00:00
skl_nau88l25_ssm4567.c ASoC: Intel: skl_nau88l25_ssm4567: rename shadowed variable 2020-01-14 15:30:16 +00:00
skl_rt286.c ASoC: Intel: skl_rt286: rename shadowed variable 2020-01-14 15:30:32 +00:00
sof_da7219_max98373.c ASoC: Intel: Add machine driver for da7219_max98373 2019-12-18 19:53:16 +00:00
sof_rt5682.c ASoC: Intel: consistent HDMI codec probing code 2020-01-27 17:52:11 +00:00