Commit 1dee43c2 authored by Ziyang Xuan's avatar Ziyang Xuan Committed by David S. Miller

octeon_ep: delete unnecessary NULL check

vfree(NULL) is safe. NULL check before vfree() is not needed.
Delete them to simplify the code.
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e68372ef
......@@ -980,7 +980,6 @@ static void octep_device_cleanup(struct octep_device *oct)
dev_info(&oct->pdev->dev, "Cleaning up Octeon Device ...\n");
for (i = 0; i < OCTEP_MAX_VF; i++) {
if (oct->mbox[i])
vfree(oct->mbox[i]);
oct->mbox[i] = NULL;
}
......
......@@ -230,7 +230,6 @@ static int octep_free_oq(struct octep_oq *oq)
octep_oq_free_ring_buffers(oq);
if (oq->buff_info)
vfree(oq->buff_info);
if (oq->desc_ring)
......
......@@ -270,7 +270,6 @@ static void octep_free_iq(struct octep_iq *iq)
desc_ring_size = OCTEP_IQ_DESC_SIZE * CFG_GET_IQ_NUM_DESC(oct->conf);
if (iq->buff_info)
vfree(iq->buff_info);
if (iq->desc_ring)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment