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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:39 +0000 (08:27 +0200)
[ Upstream commit 587731e684dcf3522215194a02357d26b9bc7277 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/fm10k/fm10k_main.c

index 746a1986690b1828be5120bf63f5297777d7b26b..09281558bfbcb8757d38a670babb44e6f41433b8 100644 (file)
@@ -1970,8 +1970,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);