Skip to content

Commit

Permalink
qlcnic: add missing destroy_workqueue() on error path in qlcnic_probe()
Browse files Browse the repository at this point in the history
Add the missing destroy_workqueue() before return from
qlcnic_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Oct 8, 2013
1 parent bdfd630 commit 2b1f18a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

err = qlcnic_alloc_adapter_resources(adapter);
if (err)
goto err_out_free_netdev;
goto err_out_free_wq;

adapter->dev_rst_time = jiffies;
adapter->ahw->revision_id = pdev->revision;
Expand Down Expand Up @@ -2396,6 +2396,9 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_out_free_hw:
qlcnic_free_adapter_resources(adapter);

err_out_free_wq:
destroy_workqueue(adapter->qlcnic_wq);

err_out_free_netdev:
free_netdev(netdev);

Expand Down

0 comments on commit 2b1f18a

Please sign in to comment.