linux-stable/sound/soc
Pierre-Louis Bossart 46ae0b3f55
ASoC: nau8821: clarify out-of-bounds check
cppcheck reports a false positive

sound/soc/codecs/nau8821.c:390:17: error: Array 'dmic_speed_sel[4]'
accessed at index 4, which is out of bounds. [arrayIndexOutOfBounds]

  dmic_speed_sel[i].param, dmic_speed_sel[i].val);
                ^
sound/soc/codecs/nau8821.c:378:2: note: After for loop, i has value 4
 for (i = 0 ; i < 4 ; i++)
 ^
sound/soc/codecs/nau8821.c:390:17: note: Array index out of bounds
  dmic_speed_sel[i].param, dmic_speed_sel[i].val);
                ^

While the code is not incorrect, we can deal with the out-of-bounds
check in a clearer way that makes static analysis happy.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20211025185933.144327-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-27 11:31:11 +01:00
..
adi
amd ASoC: amd: acp: SND_SOC_AMD_ACP_COMMON should depend on X86 && PCI 2021-10-26 17:32:04 +01:00
atmel ASoC: atmel: Convert to new style DAI format definitions 2021-09-16 14:11:30 +01:00
au1x ASoC: au1x: Convert to modern terminology for DAI clocking 2021-09-16 14:11:37 +01:00
bcm ASoC: bcm: Convert to modern clocking terminology 2021-09-27 13:01:09 +01:00
cirrus ASoC: ep93xx: Convert to modern clocking terminology 2021-09-27 13:00:54 +01:00
codecs ASoC: nau8821: clarify out-of-bounds check 2021-10-27 11:31:11 +01:00
dwc ASoC: dwc-i2s: Update to modern clocking terminology 2021-09-27 13:01:12 +01:00
fsl Merge branch 'asoc-5.15' into asoc-5.16 2021-10-18 21:15:13 +01:00
generic ASoC: soc-component: add snd_soc_component_is_codec() 2021-10-18 13:56:37 +01:00
hisilicon
img
intel ASoC: fix unmet dependency on GPIOLIB for SND_SOC_MAX98357A 2021-10-25 12:36:20 +01:00
jz4740
kirkwood ASoC: kirkwood: Fix reference to PCM buffer address 2021-07-30 17:20:51 +01:00
mediatek Linux 5.15-rc6 2021-10-18 13:50:42 +01:00
meson ASoC: meson: axg-tdm-interface: manage formatters in trigger 2021-10-22 13:25:48 +01:00
mxs
pxa ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
qcom ASoC: qdsp6: audioreach: add support for q6prm-clocks 2021-10-26 13:50:12 +01:00
rockchip Merge branch 'asoc-5.15' into asoc-5.16 2021-10-21 14:41:32 +01:00
samsung ASoC: samsung: add missing "fallthrough;" 2021-09-27 13:00:53 +01:00
sh ASoC: rsnd: adg: clearly handle clock error / NULL case 2021-08-20 13:07:26 +01:00
sof Linux 5.15-rc6 2021-10-18 13:50:42 +01:00
spear
sprd ASoC: sprd: Use managed buffer allocation 2021-08-04 08:10:27 +02:00
sti
stm
sunxi
tegra ASoC: tegra: Set default card name for Trimslice 2021-10-25 12:36:17 +01:00
ti ASoC: ti: Constify static snd_soc_ops 2021-09-29 13:06:37 +01:00
uniphier ASoC: uniphier: make arrays mul and div static const, makes object smaller 2021-08-19 18:21:23 +01:00
ux500 ASoC: ux500: mop500: Constify static snd_soc_ops 2021-09-29 13:06:38 +01:00
xilinx ASoC: xilinx: Fix reference to PCM buffer address 2021-07-30 17:20:50 +01:00
xtensa
Kconfig ASoC: topology: Select SND_DYNAMIC_MINORS 2021-07-27 13:13:04 +01:00
Makefile
soc-ac97.c ASoC: soc-ac97: cleanup cppcheck warning 2021-08-16 13:29:36 +01:00
soc-acpi.c
soc-card.c
soc-component.c ASoC: soc-component: improve error reporting for register access 2021-10-15 16:10:57 +01:00
soc-compress.c ASoC: compress/component: Use module_get_when_open/put_when_close for cstream 2021-09-20 13:30:18 +01:00
soc-core.c Merge branch 'asoc-5.15' into asoc-5.16 2021-10-18 21:15:13 +01:00
soc-dai.c ASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new() 2021-08-16 13:29:32 +01:00
soc-dapm.c Merge branch 'asoc-5.15' into asoc-5.16 2021-10-18 21:15:13 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Introduce module option prealloc_buffer_size_kbytes 2021-09-27 13:01:13 +01:00
soc-jack.c ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB 2021-08-16 13:29:34 +01:00
soc-link.c
soc-ops.c ASoC: soc-ops: cleanup cppcheck warning at snd_soc_put_xr_sx() 2021-08-03 18:27:14 +01:00
soc-pcm.c ASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step2 2021-10-18 13:56:36 +01:00
soc-topology-test.c
soc-topology.c ASoC: topology: handle endianness warning 2021-10-27 11:31:09 +01:00
soc-utils.c