summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-02-25 15:03:23 -0800
committerJames Bottomley <James.Bottomley@suse.de>2011-02-28 18:34:03 -0600
commitf2f96d20708c53c6825f842beb7bed06f5f15aca (patch)
treed1ebf5b2c1d31107024853ddf90bfe7a596e0b50 /drivers/scsi
parent70be6344ea1ad9110a5b422aeab47a3fbb01ba7f (diff)
[SCSI] fcoe: precedence bug in fcoe_filter_frames()
Negate has higher precedence than bitwise AND. FCPHF_CRC_UNCHECKED is 0x1 so the original code is equivalent to: if (!fr_flags(fp)) { ... Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/fcoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 0b5fbb8940c4..0b44d057ccc3 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1548,7 +1548,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
return -EINVAL;
}
- if (!fr_flags(fp) & FCPHF_CRC_UNCHECKED ||
+ if (!(fr_flags(fp) & FCPHF_CRC_UNCHECKED) ||
le32_to_cpu(fr_crc(fp)) == ~crc32(~0, skb->data, skb->len)) {
fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
return 0;