Skip to content

Commit d8dc872

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-lib: fix uninitialized local variable
The function local variable, curr_cycle_time is declared without initialization. When tracepoints event is not probed, it looks to be used as is. This commit fixes it. Fortunately, the value of local variable is not used unless the event is probed, thus this commit is for better coding. Reported-by: Dan Carpenter <[email protected]> Fixes: fef4e61 ("ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI") Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent ba35c3a commit d8dc872

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/firewire/amdtp-stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ static int generate_tx_packet_descs(struct amdtp_stream *s, struct pkt_desc *des
910910
unsigned int dbc = s->data_block_counter;
911911
unsigned int packet_index = s->packet_index;
912912
unsigned int queue_size = s->queue_size;
913-
u32 curr_cycle_time;
913+
u32 curr_cycle_time = 0;
914914
int i;
915915
int err;
916916

0 commit comments

Comments
 (0)