Skip to content

Commit

Permalink
ALSA: firewire-lib: use protocol error when detecting wrong value in …
Browse files Browse the repository at this point in the history
…CIP header

When detecting zero in 'dbs' field of CIP header, this packet streaming
should be aborted because of avoiding division-by-zero. This is an error
in an aspect of IEC 61883-1, thus protocol error.

This commit use EPROTO instead of EIO. Actually, the returned value is
not used for userspace and this commit has no effect.

Signed-off-by: Takashi Sakamoto <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed May 24, 2015
1 parent 12e0f43 commit a900705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/firewire/amdtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ static int handle_in_packet(struct amdtp_stream *s,
dev_err(&s->unit->device,
"Detect invalid value in dbs field: %08X\n",
cip_header[0]);
return -EIO;
return -EPROTO;
}
if (s->flags & CIP_WRONG_DBS)
data_block_quadlets = s->data_block_quadlets;
Expand Down

0 comments on commit a900705

Please sign in to comment.