浏览代码

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>
Sony Chacko 15 年之前
父节点
当前提交
57e46248a7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/qlcnic/qlcnic_main.c

+ 1 - 0
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;
 	}