From: Shannon Nelson Date: Thu, 10 Mar 2016 22:59:43 +0000 (-0800) Subject: i40e: Remove MSIx only if created X-Git-Tag: v4.1.12-92~121^2~87 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c2ca9f7c03b4db3a9fe411159eb5d3bb33ae8cb7;p=users%2Fjedix%2Flinux-maple.git i40e: Remove MSIx only if created Orabug: 23176970 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. Signed-off-by: Shannon Nelson Reviewed-by: Williams, Mitch A Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher (cherry picked from commit 692783980ad6163e8586baa36c066cd0d22fc7ce) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 56c49132cb1c2..b7345e8b1ad2a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -4135,7 +4135,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); }