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-23 17:04:27 -0700 |
commit | 05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5 (patch) | |
tree | 989993fbb9153d5456e4b0d3390161c5b67599e2 /drivers/net/ethernet/broadcom/cnic.c | |
parent | cd4175b11685b11c40e31a03e05084cc212b0649 (diff) | |
download | op-kernel-dev-05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5.zip op-kernel-dev-05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5.tar.gz |
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 cec94bb..8bc126a 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++) { |