summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>2012-07-12 07:57:21 +0400
committerDavid S. Miller <davem@davemloft.net>2012-07-12 19:16:46 +0400
commit19d59aa762f803d8663a2cdfb3f0c620f8e9512f (patch)
treeb1b43254a22e1a647bf100c603131f8e0789fc91 /drivers
parentf67ef7bae8dd025086fdf8186958865bceb44595 (diff)
downloadlinux-19d59aa762f803d8663a2cdfb3f0c620f8e9512f.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c5
1 files 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);
}
}