Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737095 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2017-09-22 01:10 +0200 |
| Last post | 2017-09-24 02:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-09-22 01:10 +0200
Re: [PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' David Miller <davem@davemloft.net> - 2017-09-24 02:20 +0200
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2017-09-22 01:10 +0200 |
| Subject | [PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' |
| Message-ID | <usiLv-77w-9@gated-at.bofh.it> |
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>
---
drivers/net/ethernet/broadcom/cnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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++) {
--
2.11.0
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-09-24 02:20 +0200 |
| Subject | Re: [PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' |
| Message-ID | <ut2Ol-1AW-7@gated-at.bofh.it> |
| In reply to | #1737095 |
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri, 22 Sep 2017 01:01:11 +0200 > 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> Applied, thank you.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web