Skip to content

Commit

Permalink
ALSA: firewire-lib: code refactoring for error path of parser for CIP…
Browse files Browse the repository at this point in the history
… header

When a parser for CIP header returns -EAGAIN, no extra care is needed
to probe tracepoints event.

This commit adds code refactoring for the error path.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Sakamoto authored and Takashi Iwai committed Jul 8, 2019
1 parent 213fa98 commit b8b0e24
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions sound/firewire/amdtp-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,8 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle,
cip_header = ctx_header + 2;
err = check_cip_header(s, cip_header, *payload_length,
data_blocks, dbc, syt);
if (err < 0) {
if (err != -EAGAIN)
return err;

*data_blocks = 0;
}
if (err < 0)
return err;
} else {
cip_header = NULL;
err = 0;
Expand All @@ -654,9 +650,6 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle,
*dbc = 0;
}

if (err < 0)
return err;

s->data_block_counter = *dbc;

trace_amdtp_packet(s, cycle, cip_header, *payload_length, *data_blocks,
Expand Down

0 comments on commit b8b0e24

Please sign in to comment.