diff options
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 8b04880ee05d..071aea79d218 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -93,13 +93,16 @@ static void be_mcc_notify(struct be_adapter *adapter) | |||
93 | * little endian) */ | 93 | * little endian) */ |
94 | static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl) | 94 | static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl) |
95 | { | 95 | { |
96 | u32 flags; | ||
97 | |||
96 | if (compl->flags != 0) { | 98 | if (compl->flags != 0) { |
97 | compl->flags = le32_to_cpu(compl->flags); | 99 | flags = le32_to_cpu(compl->flags); |
98 | BUG_ON((compl->flags & CQE_FLAGS_VALID_MASK) == 0); | 100 | if (flags & CQE_FLAGS_VALID_MASK) { |
99 | return true; | 101 | compl->flags = flags; |
100 | } else { | 102 | return true; |
101 | return false; | 103 | } |
102 | } | 104 | } |
105 | return false; | ||
103 | } | 106 | } |
104 | 107 | ||
105 | /* Need to reset the entire word that houses the valid bit */ | 108 | /* Need to reset the entire word that houses the valid bit */ |