diff options
author | Dan Carpenter <error27@gmail.com> | 2011-02-25 18:03:23 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-28 19:34:03 -0500 |
commit | f2f96d20708c53c6825f842beb7bed06f5f15aca (patch) | |
tree | d1ebf5b2c1d31107024853ddf90bfe7a596e0b50 /drivers/scsi/fcoe | |
parent | 70be6344ea1ad9110a5b422aeab47a3fbb01ba7f (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/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 2 |
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, | |||
1548 | return -EINVAL; | 1548 | return -EINVAL; |
1549 | } | 1549 | } |
1550 | 1550 | ||
1551 | if (!fr_flags(fp) & FCPHF_CRC_UNCHECKED || | 1551 | if (!(fr_flags(fp) & FCPHF_CRC_UNCHECKED) || |
1552 | le32_to_cpu(fr_crc(fp)) == ~crc32(~0, skb->data, skb->len)) { | 1552 | le32_to_cpu(fr_crc(fp)) == ~crc32(~0, skb->data, skb->len)) { |
1553 | fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED; | 1553 | fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED; |
1554 | return 0; | 1554 | return 0; |