Re: [PATCH] ALSA: via82xx: Remove unreachable branch in snd_via686_pcm_pointer()

From: Takashi Iwai

Date: Tue Jul 07 2026 - 10:35:19 EST


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@xxxxxxxxx>

Applied now. Thanks.


Takashi