fm10k: Cleanup MSI-X interrupts in case of failure
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 27 Oct 2015 23:59:12 +0000 (16:59 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 13 Dec 2015 23:28:04 +0000 (15:28 -0800)
If the q_vector allocation fails we should free the resources associated
with the MSI-X vector table.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_main.c

index df43362f2284c2c03e46eb24d1205044f8ebb29a..d8b780006394ded21b7bcfd31e5d0a041679880b 100644 (file)
@@ -1998,8 +1998,10 @@ int fm10k_init_queueing_scheme(struct fm10k_intfc *interface)
 
        /* Allocate memory for queues */
        err = fm10k_alloc_q_vectors(interface);
-       if (err)
+       if (err) {
+               fm10k_reset_msix_capability(interface);
                return err;
+       }
 
        /* Map rings to devices, and map devices to physical queues */
        fm10k_assign_rings(interface);