aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_rq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic/vnic_rq.c')
-rw-r--r--drivers/net/enic/vnic_rq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/enic/vnic_rq.c b/drivers/net/enic/vnic_rq.c
index dbb2aca258b9..34105e0951a5 100644
--- a/drivers/net/enic/vnic_rq.c
+++ b/drivers/net/enic/vnic_rq.c
@@ -77,8 +77,10 @@ void vnic_rq_free(struct vnic_rq *rq)
77 vnic_dev_free_desc_ring(vdev, &rq->ring); 77 vnic_dev_free_desc_ring(vdev, &rq->ring);
78 78
79 for (i = 0; i < VNIC_RQ_BUF_BLKS_MAX; i++) { 79 for (i = 0; i < VNIC_RQ_BUF_BLKS_MAX; i++) {
80 kfree(rq->bufs[i]); 80 if (rq->bufs[i]) {
81 rq->bufs[i] = NULL; 81 kfree(rq->bufs[i]);
82 rq->bufs[i] = NULL;
83 }
82 } 84 }
83 85
84 rq->ctrl = NULL; 86 rq->ctrl = NULL;
@@ -113,7 +115,7 @@ int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
113 return 0; 115 return 0;
114} 116}
115 117
116void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index, 118static void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
117 unsigned int fetch_index, unsigned int posted_index, 119 unsigned int fetch_index, unsigned int posted_index,
118 unsigned int error_interrupt_enable, 120 unsigned int error_interrupt_enable,
119 unsigned int error_interrupt_offset) 121 unsigned int error_interrupt_offset)