From: Padmanabh Ratnakar Date: Thu, 12 Jul 2012 03:57:21 +0000 (+0000) Subject: be2net: Fix cleanup path when EQ creation fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19d59aa762f803d8663a2cdfb3f0c620f8e9512f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git be2net: Fix cleanup path when EQ creation fails Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller --- 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); } }