qlcnic: fix diag resource allocation

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sony Chacko 2010-07-24 18:32:18 +00:00 committed by David S. Miller
parent 36a1898ddf
commit 57e46248a7
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}