diff options
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ctx.c | 3 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index 0a6a39914aec..c2c1f5cc16c6 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/drivers/net/qlcnic/qlcnic_ctx.c | |||
@@ -421,7 +421,8 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter) | |||
421 | 421 | ||
422 | if (addr == NULL) { | 422 | if (addr == NULL) { |
423 | dev_err(&pdev->dev, "failed to allocate tx desc ring\n"); | 423 | dev_err(&pdev->dev, "failed to allocate tx desc ring\n"); |
424 | return -ENOMEM; | 424 | err = -ENOMEM; |
425 | goto err_out_free; | ||
425 | } | 426 | } |
426 | 427 | ||
427 | tx_ring->desc_head = (struct cmd_desc_type0 *)addr; | 428 | tx_ring->desc_head = (struct cmd_desc_type0 *)addr; |
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 77bfdaba83e8..dccd8c3d65e5 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c | |||
@@ -210,7 +210,7 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter) | |||
210 | cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring)); | 210 | cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring)); |
211 | if (cmd_buf_arr == NULL) { | 211 | if (cmd_buf_arr == NULL) { |
212 | dev_err(&netdev->dev, "failed to allocate cmd buffer ring\n"); | 212 | dev_err(&netdev->dev, "failed to allocate cmd buffer ring\n"); |
213 | return -ENOMEM; | 213 | goto err_out; |
214 | } | 214 | } |
215 | memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); | 215 | memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); |
216 | tx_ring->cmd_buf_arr = cmd_buf_arr; | 216 | tx_ring->cmd_buf_arr = cmd_buf_arr; |
@@ -221,7 +221,7 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter) | |||
221 | rds_ring = kzalloc(size, GFP_KERNEL); | 221 | rds_ring = kzalloc(size, GFP_KERNEL); |
222 | if (rds_ring == NULL) { | 222 | if (rds_ring == NULL) { |
223 | dev_err(&netdev->dev, "failed to allocate rds ring struct\n"); | 223 | dev_err(&netdev->dev, "failed to allocate rds ring struct\n"); |
224 | return -ENOMEM; | 224 | goto err_out; |
225 | } | 225 | } |
226 | recv_ctx->rds_rings = rds_ring; | 226 | recv_ctx->rds_rings = rds_ring; |
227 | 227 | ||