Commit 823bb2e8 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

staging: et131x: Reduce indenting in et131x_rx_dma_memory_free()

This change negates an 'if' statement, allowing a large block of code
to be un-indented, making the code more readable.
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a2bd6b2
......@@ -2443,14 +2443,15 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
/* Free Free Buffer Rings */
for (id = 0; id < NUM_FBRS; id++) {
if (rx_ring->fbr[id]->ring_virtaddr) {
if (!rx_ring->fbr[id]->ring_virtaddr)
continue;
/* First the packet memory */
for (index = 0; index <
(rx_ring->fbr[id]->num_entries / FBR_CHUNKS);
for (index = 0;
index < (rx_ring->fbr[id]->num_entries / FBR_CHUNKS);
index++) {
if (rx_ring->fbr[id]->mem_virtaddrs[index]) {
bufsize = (rx_ring->fbr[id]->buffsize * FBR_CHUNKS);
bufsize = rx_ring->fbr[id]->buffsize * FBR_CHUNKS;
dma_free_coherent(&adapter->pdev->dev,
bufsize,
......@@ -2470,7 +2471,6 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
rx_ring->fbr[id]->ring_virtaddr = NULL;
}
}
/* Free Packet Status Ring */
if (rx_ring->ps_ring_virtaddr) {
......
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