summaryrefslogtreecommitdiff
path: root/sound/firewire
diff options
context:
space:
mode:
authorAlexey Nepomnyashih <sdl@nppct.ru>2026-03-16 19:18:22 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 13:25:39 +0200
commit32cbe083e0ae445f6f7cac8a6482d3bc017ea349 (patch)
tree4b0d5a8c49593fcc8bde41324afd97fe58505176 /sound/firewire
parent8a8bf09aa39d32d586da50d7ef1e76f41dfa9773 (diff)
ALSA: firewire-lib: fix uninitialized local variable
commit bb120ad57def62e3f23e3d999c5fbed11f610993 upstream. 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> Link: https://patch.msgid.link/20260316191824.83249-1-sdl@nppct.ru Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/amdtp-stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 5cdc34877fc1..76cc2b0801c9 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -1179,7 +1179,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;