aboutsummaryrefslogtreecommitdiff
path: root/sound/firewire
diff options
context:
space:
mode:
authorTakashi Sakamoto2015-05-22 23:21:14 +0900
committerTakashi Iwai2015-05-24 08:23:58 +0200
commita900705491e6f377966711aa95df753b5ae16dd3 (patch)
tree02ae73213b38a6cf58757233822f8ae35ce8484e /sound/firewire
parent12e0f438d312fd40815249198ec1e4f3abddacc5 (diff)
ALSA: firewire-lib: use protocol error when detecting wrong value in 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 <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/amdtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c
index 93cf93a66aed..2b3e8b1319f7 100644
--- a/sound/firewire/amdtp.c
+++ b/sound/firewire/amdtp.c
@@ -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;