]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] IB/mthca: Initialize eq->nent before we use it
authorRoland Dreier <rolandd@cisco.com>
Sun, 18 Sep 2005 20:52:06 +0000 (13:52 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 19 Sep 2005 05:02:38 +0000 (22:02 -0700)
commitc915033fc62d7186d243d89f88782d6be33fd8f6
treee509ef63ef6dba42f31807b5c9f6c20b48be3a9a
parentce5b65cc9626feac0d4ffb96f798407e50c45575
[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: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_eq.c