[lvc-project] [PATCH] ALSA: via82xx: Remove unreachable branch in snd_via686_pcm_pointer()

Takashi Iwai tiwai at suse.de
Tue Jul 7 17:35:00 MSK 2026


On Mon, 06 Jul 2026 15:16:34 +0200,
Evgenii Burenchev wrote:
> 
> The condition
> 
> 	if (count && size < count)
> 
> can never evaluate to true.
> 
> The VIA DMA count register is masked with 0x00ffffff before use, while
> the DMA buffer size is limited to 0x00fffffe bytes. As a result, 'count'
> can never exceed 'size', making the condition permanently false.
> 
> This branch has therefore been unreachable since the driver was
> introduced. Remove the unreachable branch without changing runtime
> behavior.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Evgenii Burenchev <evg28bur at yandex.ru>

Applied now.  Thanks.


Takashi



More information about the lvc-project mailing list