提交 de524681 编写于 作者: W Wei Yongjun 提交者: Jeff Kirsher

igbvf: add missing iounmap() on error in igbvf_probe()

Add the missing iounmap() before return from igbvf_probe()
in the error handling case.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Tested-by: NSibai Li <Sibai.li@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 3de9e65f
...@@ -2698,7 +2698,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2698,7 +2698,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ei->get_variants) { if (ei->get_variants) {
err = ei->get_variants(adapter); err = ei->get_variants(adapter);
if (err) if (err)
goto err_ioremap; goto err_get_variants;
} }
/* setup adapter struct */ /* setup adapter struct */
...@@ -2795,6 +2795,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2795,6 +2795,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
kfree(adapter->rx_ring); kfree(adapter->rx_ring);
err_sw_init: err_sw_init:
igbvf_reset_interrupt_capability(adapter); igbvf_reset_interrupt_capability(adapter);
err_get_variants:
iounmap(adapter->hw.hw_addr); iounmap(adapter->hw.hw_addr);
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册