public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: firewire-lib: fix uninitialized local variable
@ 2026-03-16 19:18 Alexey Nepomnyashih
  2026-03-17  8:55 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Nepomnyashih @ 2026-03-16 19:18 UTC (permalink / raw)
  To: Clemens Ladisch
  Cc: Alexey Nepomnyashih, Takashi Sakamoto, Jaroslav Kysela,
	Takashi Iwai, linux-sound, linux-kernel, lvc-project, stable

Similar to commit d8dc8720468a ("ALSA: firewire-lib: fix uninitialized
local variable"), the local variable `curr_cycle_time` in
process_rx_packets() is declared without initialization.

When the tracepoint event is not probed, the variable may appear to be
used without being initialized. In practice the value is only relevant
when the tracepoint is enabled, however initializing it avoids potential
use of an uninitialized value and improves code safety.

Initialize `curr_cycle_time` to zero.

Fixes: fef4e61b0b76 ("ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI")
Cc: stable@vger.kernel.org
Signed-off-by: Alexey Nepomnyashih <sdl@nppct.ru>
---

 sound/firewire/amdtp-stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index e97721f80f65..8e70da850fac 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -1164,7 +1164,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
 	struct pkt_desc *desc = s->packet_descs_cursor;
 	unsigned int pkt_header_length;
 	unsigned int packets;
-	u32 curr_cycle_time;
+	u32 curr_cycle_time = 0;
 	bool need_hw_irq;
 	int i;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-17  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 19:18 [PATCH] ALSA: firewire-lib: fix uninitialized local variable Alexey Nepomnyashih
2026-03-17  8:55 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox