be2net: Fix cleanup path when EQ creation fails
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Thu, 12 Jul 2012 03:57:21 +0000 (03:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2012 15:16:46 +0000 (08:16 -0700)
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c

index 9e7dbd59b57e3721622b070aec420ceda4743f32..cf6ad1f2bf525a1c95c4faad5b6335ec76dac06c 100644 (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);
        }
 }