ALSA: firewire-lib: use protocol error when detecting wrong value in CIP header
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 22 May 2015 14:21:14 +0000 (23:21 +0900)
committerTakashi Iwai <tiwai@suse.de>
Sun, 24 May 2015 06:23:58 +0000 (08:23 +0200)
commita900705491e6f377966711aa95df753b5ae16dd3
tree02ae73213b38a6cf58757233822f8ae35ce8484e
parent12e0f438d312fd40815249198ec1e4f3abddacc5
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>
sound/firewire/amdtp.c