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

Commit 58477176 authored by Gaosheng Cui's avatar Gaosheng Cui Committed by Greg Kroah-Hartman
Browse files

intel/igbvf: free irq on the error path in igbvf_request_msix()



[ Upstream commit 85eb39bb39cbb5c086df1e19ba67cc1366693a77 ]

In igbvf_request_msix(), irqs have not been freed on the err path,
we need to free it. Fix it.

Fixes: d4e0fe01 ("igbvf: add new driver to support 82576 virtual functions")
Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: default avatarMarek Szlosek <marek.szlosek@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6999f854
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1070,7 +1070,7 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
			  igbvf_intr_msix_rx, 0, adapter->rx_ring->name,
			  netdev);
	if (err)
		goto out;
		goto free_irq_tx;

	adapter->rx_ring->itr_register = E1000_EITR(vector);
	adapter->rx_ring->itr_val = adapter->current_itr;
@@ -1079,10 +1079,14 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
	err = request_irq(adapter->msix_entries[vector].vector,
			  igbvf_msix_other, 0, netdev->name, netdev);
	if (err)
		goto out;
		goto free_irq_rx;

	igbvf_configure_msix(adapter);
	return 0;
free_irq_rx:
	free_irq(adapter->msix_entries[--vector].vector, netdev);
free_irq_tx:
	free_irq(adapter->msix_entries[--vector].vector, netdev);
out:
	return err;
}