Skip to content
Commit c915033f authored by Roland Dreier's avatar Roland Dreier
Browse files

[PATCH] IB/mthca: Initialize eq->nent before we use it



In mthca_create_eq(), we call get_eqe() before setting eq->nent.  This
is wrong, because get_eqe() uses eq->nent.  Fix this, and clean up the
code a little while we're at it.  (We got lucky with the current code,
because eq->nent was cleared to 0, which get_eqe() made happen to do
the right thing)

Pointed out by Michael S. Tsirkin <mst@mellanox.co.il>

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ce5b65cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment