Skip to content

Commit 05cf97e

Browse files
tititiou36davem330
authored andcommitted
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>
1 parent cd4175b commit 05cf97e

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/cnic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
12781278

12791279
ret = cnic_alloc_dma(dev, kwq_16_dma, pages, 0);
12801280
if (ret)
1281-
return -ENOMEM;
1281+
goto error;
12821282

12831283
n = CNIC_PAGE_SIZE / CNIC_KWQ16_DATA_SIZE;
12841284
for (i = 0, j = 0; i < cp->max_cid_space; i++) {

0 commit comments

Comments
 (0)