diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-09-22 01:01:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-24 02:04:27 +0200 |
commit | 05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5 (patch) | |
tree | 989993fbb9153d5456e4b0d3390161c5b67599e2 /drivers/net/ethernet/broadcom/cnic.c | |
parent | Merge branch 'parisc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
download | linux-05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5.tar.xz linux-05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5.zip |
cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()'
All the error handling paths 'goto error', except this one.
We should also go to error in this case, or some resources will be
leaking.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index cec94bbb2ea5..8bc126a156e8 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -1278,7 +1278,7 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev) ret = cnic_alloc_dma(dev, kwq_16_dma, pages, 0); if (ret) - return -ENOMEM; + goto error; n = CNIC_PAGE_SIZE / CNIC_KWQ16_DATA_SIZE; for (i = 0, j = 0; i < cp->max_cid_space; i++) { |