be2net: Fix cleanup path when EQ creation fails

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Padmanabh Ratnakar 2012-07-12 03:57:21 +00:00 committed by David S. Miller
parent f67ef7bae8
commit 19d59aa762

View File

@ -1734,9 +1734,10 @@ static void be_evt_queues_destroy(struct be_adapter *adapter)
int i;
for_all_evt_queues(adapter, eqo, i) {
be_eq_clean(eqo);
if (eqo->q.created)
if (eqo->q.created) {
be_eq_clean(eqo);
be_cmd_q_destroy(adapter, &eqo->q, QTYPE_EQ);
}
be_queue_free(adapter, &eqo->q);
}
}