From 19d59aa762f803d8663a2cdfb3f0c620f8e9512f Mon Sep 17 00:00:00 2001 From: Padmanabh Ratnakar Date: Thu, 12 Jul 2012 03:57:21 +0000 Subject: [PATCH] be2net: Fix cleanup path when EQ creation fails Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 9e7dbd59b57e..cf6ad1f2bf52 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -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); } } -- 2.20.1