aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_wq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic/vnic_wq.c')
-rw-r--r--drivers/net/enic/vnic_wq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/enic/vnic_wq.c b/drivers/net/enic/vnic_wq.c
index 122e33bcc578..df61bd932ea6 100644
--- a/drivers/net/enic/vnic_wq.c
+++ b/drivers/net/enic/vnic_wq.c
@@ -77,8 +77,10 @@ void vnic_wq_free(struct vnic_wq *wq)
77 vnic_dev_free_desc_ring(vdev, &wq->ring); 77 vnic_dev_free_desc_ring(vdev, &wq->ring);
78 78
79 for (i = 0; i < VNIC_WQ_BUF_BLKS_MAX; i++) { 79 for (i = 0; i < VNIC_WQ_BUF_BLKS_MAX; i++) {
80 kfree(wq->bufs[i]); 80 if (wq->bufs[i]) {
81 wq->bufs[i] = NULL; 81 kfree(wq->bufs[i]);
82 wq->bufs[i] = NULL;
83 }
82 } 84 }
83 85
84 wq->ctrl = NULL; 86 wq->ctrl = NULL;
@@ -113,7 +115,7 @@ int vnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index,
113 return 0; 115 return 0;
114} 116}
115 117
116void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index, 118static void vnic_wq_init_start(struct vnic_wq *wq, 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)