[Intel-wired-lan] [next PATCH S30 v3 05/13] i40e: Remove msix only if created

ajdayana avinash.dayanand at intel.com
Thu Mar 10 22:59:43 UTC 2016


From: Shannon Nelson <shannon.nelson at intel.com>

When cleaning up the interrupt handling, clean up the irqs only if
we actually got them set up.  There are a couple of error recovery
paths that were violating this and causing the kernel a bit of
indigestion.

Testing Hints:
Inject an error om the i40e_probe() that puts the driver into the
debug mode, then remove the driver.  Often this causes a NULL pointer
warning from the i40e_remove trace.

Reviewed-by: Williams, Mitch A <mitch.a.williams at intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 59e911f..260abd8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4164,7 +4164,7 @@ static void i40e_clear_interrupt_scheme(struct i40e_pf *pf)
 	int i;
 
 	i40e_stop_misc_vector(pf);
-	if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
+	if (pf->flags & I40E_FLAG_MSIX_ENABLED && pf->msix_entries) {
 		synchronize_irq(pf->msix_entries[0].vector);
 		free_irq(pf->msix_entries[0].vector, pf);
 	}
-- 
2.4.3



More information about the Intel-wired-lan mailing list