Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f734dfff authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher
Browse files

i40e: trivial: cleanup use of pf->hw



This patch makes use of a pointer called hw consistent
in the i40e_remove function.

Change-ID: Idacc7ff0a09a68289c57457a78618bf5497de077
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 00e5ec4b
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -11219,8 +11219,8 @@ static void i40e_remove(struct pci_dev *pdev)
		i40e_vsi_release(pf->vsi[pf->lan_vsi]);
		i40e_vsi_release(pf->vsi[pf->lan_vsi]);


	/* shutdown and destroy the HMC */
	/* shutdown and destroy the HMC */
	if (pf->hw.hmc.hmc_obj) {
	if (hw->hmc.hmc_obj) {
		ret_code = i40e_shutdown_lan_hmc(&pf->hw);
		ret_code = i40e_shutdown_lan_hmc(hw);
		if (ret_code)
		if (ret_code)
			dev_warn(&pdev->dev,
			dev_warn(&pdev->dev,
				 "Failed to destroy the HMC resources: %d\n",
				 "Failed to destroy the HMC resources: %d\n",
@@ -11228,7 +11228,7 @@ static void i40e_remove(struct pci_dev *pdev)
	}
	}


	/* shutdown the adminq */
	/* shutdown the adminq */
	ret_code = i40e_shutdown_adminq(&pf->hw);
	ret_code = i40e_shutdown_adminq(hw);
	if (ret_code)
	if (ret_code)
		dev_warn(&pdev->dev,
		dev_warn(&pdev->dev,
			 "Failed to destroy the Admin Queue resources: %d\n",
			 "Failed to destroy the Admin Queue resources: %d\n",
@@ -11256,7 +11256,7 @@ static void i40e_remove(struct pci_dev *pdev)
	kfree(pf->qp_pile);
	kfree(pf->qp_pile);
	kfree(pf->vsi);
	kfree(pf->vsi);


	iounmap(pf->hw.hw_addr);
	iounmap(hw->hw_addr);
	kfree(pf);
	kfree(pf);
	pci_release_selected_regions(pdev,
	pci_release_selected_regions(pdev,
				     pci_select_bars(pdev, IORESOURCE_MEM));
				     pci_select_bars(pdev, IORESOURCE_MEM));