summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/cnic.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-09-22 02:01:11 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-24 03:04:27 +0300
commit05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5 (patch)
tree989993fbb9153d5456e4b0d3390161c5b67599e2 /drivers/net/ethernet/broadcom/cnic.c
parentcd4175b11685b11c40e31a03e05084cc212b0649 (diff)
downloadlinux-05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5.tar.xz
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.c2
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++) {