From: Alexander Duyck Date: Tue, 27 Oct 2015 23:59:12 +0000 (-0700) Subject: fm10k: Cleanup MSI-X interrupts in case of failure X-Git-Tag: firefly_0821_release~176^2~4^2~31^2~169 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e0ee2ce51824680b687a73857ef64182bbfd3a14;p=firefly-linux-kernel-4.4.55.git fm10k: Cleanup MSI-X interrupts in case of failure [ 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 Reviewed-by: Bruce Allan Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c index 746a1986690b..09281558bfbc 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c @@ -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);