summaryrefslogtreecommitdiff
path: root/lib/klist.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>2020-01-24 15:36:25 -0600
committerMark Brown <broonie@kernel.org>2020-01-27 17:52:11 +0000
commit98ff5c262f27aafee077a4c096f71a8566e9e948 (patch)
treeb9d52e105391802c99d02764139b6173a83b3f55 /lib/klist.c
parentbd01cf38eedceb87d43f9205a75b259361e056ea (diff)
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>
Diffstat (limited to 'lib/klist.c')
0 files changed, 0 insertions, 0 deletions