Commit 30e23b71 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: return proper error code when pci_enable_msix_range fails

The pci_enable_msix_range() function returns a positive value of the
number of allocated vectors if it succeeds. On failure it returns
a negative error code. Return this code properly so that the error
message printed by the driver will show the actual error code instead of
being masked by -ENOMEM.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0356b23b
...@@ -1858,7 +1858,7 @@ static int fm10k_init_msix_capability(struct fm10k_intfc *interface) ...@@ -1858,7 +1858,7 @@ static int fm10k_init_msix_capability(struct fm10k_intfc *interface)
if (v_budget < 0) { if (v_budget < 0) {
kfree(interface->msix_entries); kfree(interface->msix_entries);
interface->msix_entries = NULL; interface->msix_entries = NULL;
return -ENOMEM; return v_budget;
} }
/* record the number of queues available for q_vectors */ /* record the number of queues available for q_vectors */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment