diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-03-20 13:08:25 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-03-20 13:08:25 -0500 |
commit | 6b63e3015a69dd8aa5534e23af9f132a021da02e (patch) | |
tree | 58c8ffeaf4a46e4ac5af98ebbaae7543c43561a9 | |
parent | 048975ac580a771fc5bb96c6b454cba897ab1a73 (diff) |
IB/mthca: Coverity fix to mthca_init_eq_table()
Fix bug found by coverity: the loop body never executed, because it
was doing for (i = 0; i < MTHCA_EQ_CMD; ++i), but MTHCA_EQ_CMD is 0.
The correct loop bound is MTHCA_NUM_EQ, to loop over all EQs.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_eq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index a44b12dd7952..cbdc348fb689 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c | |||
@@ -928,7 +928,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev) | |||
928 | mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n", | 928 | mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n", |
929 | dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status); | 929 | dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status); |
930 | 930 | ||
931 | for (i = 0; i < MTHCA_EQ_CMD; ++i) | 931 | for (i = 0; i < MTHCA_NUM_EQ; ++i) |
932 | if (mthca_is_memfree(dev)) | 932 | if (mthca_is_memfree(dev)) |
933 | arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask); | 933 | arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask); |
934 | else | 934 | else |