diff mbox

[PATCHv2,NEXT,2/2] qlcnic: fix diag resource allocation

Message ID 1280032338-7002-3-git-send-email-amit.salecha@qlogic.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

amit salecha July 25, 2010, 4:32 a.m. UTC
From: Sony Chacko <sony.chacko@qlogic.com>

netif_device_attach missing from error path in qlcnic_diag_alloc_res

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller July 25, 2010, 11:36 p.m. UTC | #1
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Sat, 24 Jul 2010 21:32:18 -0700

> From: Sony Chacko <sony.chacko@qlogic.com>
> 
> netif_device_attach missing from error path in qlcnic_diag_alloc_res
> 
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index f147958..b9615bd 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -1176,6 +1176,7 @@  int qlcnic_diag_alloc_res(struct net_device *netdev, int test)
 	ret = qlcnic_fw_create_ctx(adapter);
 	if (ret) {
 		qlcnic_detach(adapter);
+		netif_device_attach(netdev);
 		return ret;
 	}