linux-stable/sound/soc
Richard Fitzgerald fe9989fb25
ASoC: wm_adsp: Fix uninitialized variable warnings
wm_adsp_read_data_word() used if (ret) to check for an error from
wm_adsp_read_raw_data_block(). While this is perfectly valid,
wm_adsp_read_raw_data_block() itself uses if (ret < 0) and three
calls to wm_adsp_read_data_word() also use if (ret < 0).

This creates an error check chain like this:

  1st) if (ret < 0) return ret;
  2nd) if (ret) return ret;
  3rd) if (ret < 0) ...

This can confuse the compiler into thinking that there are possible
returns > 0 from the middle if() that are not handled by the final
if(). If this was true it would lead to using uninitialized variables
later in the outer function.

Fix this by changing the test in wm_adsp_read_data_word() to be
if (ret < 0).

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210111133825.8758-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-11 14:03:53 +00:00
..
adi ASoc: adi: Kconfig: Remove depends on for ADI reference designs 2020-11-17 17:08:42 +00:00
amd ASoC: rt1015: remove bclk_ratio 2021-01-05 14:34:18 +00:00
atmel ASoC: atmel: fix spelling mistake in Kconfig "programable" -> "programmable" 2020-12-16 13:53:53 +00:00
au1x
bcm ASoC: bcm2835-i2s: remove unneeded semicolon 2020-11-02 15:53:22 +00:00
cirrus
codecs ASoC: wm_adsp: Fix uninitialized variable warnings 2021-01-11 14:03:53 +00:00
dwc
fsl ASoC: fsl_aud2htx: select SND_SOC_IMX_PCM_DMA 2021-01-04 14:25:00 +00:00
generic ASoC: Fix 7/8 spaces indentation in Kconfig 2020-11-17 17:08:45 +00:00
hisilicon treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
img
intel ASoC: Intel: bytcht_es8316: Remove comment about SSP0 being untested 2021-01-07 16:14:12 +00:00
jz4740 Merge remote-tracking branch 'asoc/for-5.11' into asoc-next 2020-12-11 17:48:04 +00:00
kirkwood ASoC: kirkwood: armada-370-db: mark OF related data as maybe unused 2020-11-26 13:07:04 +00:00
mediatek ASoC: rt1015: remove bclk_ratio 2021-01-05 14:34:18 +00:00
meson ASoC: meson: Use managed DMA buffer allocation 2020-12-28 12:24:46 +00:00
mxs
pxa ASoC: mmp-sspa: set phase two word length register 2020-11-20 13:49:08 +00:00
qcom Merge existing fixes from asoc/for-5.11 2020-12-28 12:24:15 +00:00
rockchip ASoC: rockchip: mark OF related data as maybe unused 2020-11-26 13:07:07 +00:00
samsung ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr() 2020-11-26 13:07:33 +00:00
sh ASoC: rsnd: don't call clk_disable_unprepare() if can't use 2020-12-17 14:24:42 +00:00
sirf
sof ASoC: SOF: Fix spelling mistake in Kconfig "ond" -> "and" 2020-12-16 13:53:51 +00:00
spear
sprd ASoC: sprd: Switch to use list_entry_is_head() helper 2020-12-28 12:24:45 +00:00
sti
stm Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
sunxi ASoC: sunxi: do not select COMMON_CLK to fix builds 2020-11-19 13:00:01 +00:00
tegra ASoC: tegra: Don't warn on probe deferral 2020-11-11 12:35:10 +00:00
ti ASoC: Updates for v5.11 2020-12-14 15:57:14 +01:00
uniphier ASoC: uniphier: mark OF related data as maybe unused 2020-11-26 13:07:09 +00:00
ux500
xilinx
xtensa
zte treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig ASoC: txx9: Remove driver 2021-01-06 13:08:00 +00:00
Makefile ASoC: txx9: Remove driver 2021-01-06 13:08:00 +00:00
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c ASoC: soc-pcm: care trigger rollback 2020-12-09 12:13:38 +00:00
soc-compress.c ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free() 2020-11-26 13:09:37 +00:00
soc-core.c Auxiliary Bus support tag for 5.11-rc1 2020-12-04 20:39:45 +00:00
soc-dai.c ASoC: soc-pcm: care trigger rollback 2020-12-09 12:13:38 +00:00
soc-dapm.c ASoC: dapm: remove widget from dirty list on free 2020-12-15 13:29:01 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Document support for TX only or RX only streams 2020-10-09 15:11:20 +01:00
soc-jack.c
soc-link.c ASoC: soc-pcm: care trigger rollback 2020-12-09 12:13:38 +00:00
soc-ops.c
soc-pcm.c ASoC: soc-pcm: return correct -ERRNO in failure path 2021-01-11 14:03:52 +00:00
soc-topology.c ASoC: topology: Fix wrong size check 2020-12-11 13:23:01 +00:00
soc-utils.c