diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-07-04 10:40:06 +0200 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-07-04 10:48:05 +0200 |
commit | 8d53e9f3c6001dcb2865f6e894da5b54e1418f88 (patch) | |
tree | 63907f21c13636a987d43463c675d0727a04e327 /drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | |
parent | e2bea7436061ca2e7e14bfcfdc5870f2555c3965 (diff) |
New upstream version 18.11.2upstream-18.11-stable
Change-Id: I23eb4f9179abf1f9c659891f8fddb27ee68ad26b
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c')
-rw-r--r-- | drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index c68d9400..37b7991f 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -16,7 +16,9 @@ #include <assert.h> #include <stdio.h> +#if defined(RTE_BACKTRACE) #include <execinfo.h> +#endif #include <stdlib.h> #include <unistd.h> #include <stdint.h> @@ -788,17 +790,17 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev) if (cpp->driver_lock_needed) { ret = nfp_acquire_process_lock(desc); if (ret) - return -1; + goto error; } if (nfp6000_set_model(dev, cpp) < 0) - return -1; + goto error; if (nfp6000_set_interface(dev, cpp) < 0) - return -1; + goto error; if (nfp6000_set_serial(dev, cpp) < 0) - return -1; + goto error; if (nfp6000_set_barsz(dev, desc) < 0) - return -1; + goto error; desc->cfg = (char *)dev->mem_resource[0].addr; @@ -809,7 +811,11 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev) model = __nfp_cpp_model_autodetect(cpp); nfp_cpp_model_set(cpp, model); - return ret; + return 0; + +error: + free(desc); + return -1; } static void |