ALSA: firewire-lib: fix to check cycle continuity
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 18 Feb 2024 03:30:26 +0000 (12:30 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Feb 2024 08:25:52 +0000 (09:25 +0100)
commit77ce96543b03f437c6b45f286d8110db2b6622a3
treeb704f7bdeadf46218cdae5fc65d34c6e276e69c2
parent41c25e193b2befc22462aa41591d397fab174ca1
ALSA: firewire-lib: fix to check cycle continuity

The local helper function to compare the given pair of cycle count
evaluates them. If the left value is less than the right value, the
function returns negative value.

If the safe cycle is less than the current cycle, it is the case of
cycle lost. However, it is not currently handled properly.

This commit fixes the bug.

Cc: <stable@vger.kernel.org>
Fixes: 705794c53b00 ("ALSA: firewire-lib: check cycle continuity")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20240218033026.72577-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c