linux-stable/sound/drivers
Andrew Gabbasov 5061bb7065 ALSA: aloop: Avoid pointer dereference before null-check
Static analysis tools (cppcheck and PVS Studio) report an error
in loopback_snd_timer_period_elapsed() regarding dpcm_play pointer
dereference earlier than its null-check. And although this is a result
of a formal check, and the pointer correctness is also protected
by having a corresponding bit set in the "running" mask, re-ordering
of the lines can imake the code even formally correct and eliminate
those static analysis error reports.

Fixes: 26c53379f9 ("ALSA: aloop: Support selection of snd_timer instead of jiffies")
Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Link: https://lore.kernel.org/r/20191127110622.26105-1-andrew_gabbasov@mentor.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-27 12:16:00 +01:00
..
mpu401 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opl3 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opl4 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pcsp ALSA: drivers: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
vx ALSA: vx: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
aloop.c ALSA: aloop: Avoid pointer dereference before null-check 2019-11-27 12:16:00 +01:00
dummy.c ALSA: drivers: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
Kconfig ALSA: aloop: Fix dependency on timer API 2019-11-24 09:40:53 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ml403-ac97cr.c ALSA: drivers: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
mtpav.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mts64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
pcm-indirect2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
pcm-indirect2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
portman2x4.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
serial-u16550.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
virmidi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00