i40e: Remove MSIx only if created
authorShannon Nelson <shannon.nelson@intel.com>
Thu, 10 Mar 2016 22:59:43 +0000 (14:59 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 5 Apr 2016 09:55:57 +0000 (02:55 -0700)
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 <shannon.nelson@intel.com>
Reviewed-by: Williams, Mitch A <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 650336e502551d1124446c60dba198efb9a79473..2464dca88f794e2e153ad07e6a75ac4c0af61580 100644 (file)
@@ -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);
        }