Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25b0b999 authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller
Browse files

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: default avatarBreno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3d8fd385
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -546,7 +546,6 @@ 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);
		rxr->rx_buf_ring = NULL;

@@ -557,7 +556,6 @@ 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);
		rxr->rx_pg_ring = NULL;
	}