summaryrefslogtreecommitdiff
path: root/sound/firewire/fcp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-05-02 08:24:42 +0200
committerTakashi Iwai <tiwai@suse.de>2017-05-02 08:24:42 +0200
commitd7dc450d5a7162de96edbed6b1792240c2f3a55f (patch)
treed6dc2d26b393dd69881cd4b9498718f65b35abeb /sound/firewire/fcp.c
parentd4a2fbcee0c8449ce24d6de168f3d90c5e6d7596 (diff)
parent0997e378be1d888a5d093eeee55f842cdfe55ebe (diff)
Merge branch 'for-next' into for-linus
For 4.12 merge.
Diffstat (limited to 'sound/firewire/fcp.c')
-rw-r--r--sound/firewire/fcp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/firewire/fcp.c b/sound/firewire/fcp.c
index cce19768f43d..61dda828f767 100644
--- a/sound/firewire/fcp.c
+++ b/sound/firewire/fcp.c
@@ -63,7 +63,9 @@ int avc_general_set_sig_fmt(struct fw_unit *unit, unsigned int rate,
/* do transaction and check buf[1-5] are the same against command */
err = fcp_avc_transaction(unit, buf, 8, buf, 8,
BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5));
- if (err >= 0 && err < 8)
+ if (err < 0)
+ ;
+ else if (err < 8)
err = -EIO;
else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
err = -ENOSYS;
@@ -106,7 +108,9 @@ int avc_general_get_sig_fmt(struct fw_unit *unit, unsigned int *rate,
/* do transaction and check buf[1-4] are the same against command */
err = fcp_avc_transaction(unit, buf, 8, buf, 8,
BIT(1) | BIT(2) | BIT(3) | BIT(4));
- if (err >= 0 && err < 8)
+ if (err < 0)
+ ;
+ else if (err < 8)
err = -EIO;
else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
err = -ENOSYS;
@@ -154,7 +158,9 @@ int avc_general_get_plug_info(struct fw_unit *unit, unsigned int subunit_type,
buf[3] = 0xff & subfunction;
err = fcp_avc_transaction(unit, buf, 8, buf, 8, BIT(1) | BIT(2));
- if (err >= 0 && err < 8)
+ if (err < 0)
+ ;
+ else if (err < 8)
err = -EIO;
else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
err = -ENOSYS;