Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b63e301 authored by Roland Dreier's avatar Roland Dreier
Browse files

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 048975ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -928,7 +928,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev)
		mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n",
			   dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status);

	for (i = 0; i < MTHCA_EQ_CMD; ++i)
	for (i = 0; i < MTHCA_NUM_EQ; ++i)
		if (mthca_is_memfree(dev))
			arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask);
		else