Skip to content

Commit bb120ad

Browse files
Alexey Nepomnyashihtiwai
authored andcommitted
ALSA: firewire-lib: fix uninitialized local variable
Similar to commit d8dc872 ("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: fef4e61 ("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> Link: https://patch.msgid.link/20260316191824.83249-1-sdl@nppct.ru Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 0bdf27a commit bb120ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/firewire/amdtp-stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
11641164
struct pkt_desc *desc = s->packet_descs_cursor;
11651165
unsigned int pkt_header_length;
11661166
unsigned int packets;
1167-
u32 curr_cycle_time;
1167+
u32 curr_cycle_time = 0;
11681168
bool need_hw_irq;
11691169
int i;
11701170

0 commit comments

Comments
 (0)