提交 25b0b999 编写于 作者: B Breno Leitao 提交者: David S. Miller

bnx2: no need to check before vfreeing

There is no need to check if a pointer is NULL before calling
vfree(), since vfree() function already check for it.
Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3d8fd385
......@@ -546,8 +546,7 @@ bnx2_free_rx_mem(struct bnx2 *bp)
rxr->rx_desc_mapping[j]);
rxr->rx_desc_ring[j] = NULL;
}
if (rxr->rx_buf_ring)
vfree(rxr->rx_buf_ring);
vfree(rxr->rx_buf_ring);
rxr->rx_buf_ring = NULL;
for (j = 0; j < bp->rx_max_pg_ring; j++) {
......@@ -557,8 +556,7 @@ bnx2_free_rx_mem(struct bnx2 *bp)
rxr->rx_pg_desc_mapping[j]);
rxr->rx_pg_desc_ring[j] = NULL;
}
if (rxr->rx_pg_ring)
vfree(rxr->rx_pg_ring);
vfree(rxr->rx_pg_ring);
rxr->rx_pg_ring = NULL;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册