cirrus: Remove redundant NULL check before kfree
Subsystems (3)
PATCH 1/1 cirrus: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.
Signed-off-by Syam Sidhardhan <[email protected]>
--- drivers/net/ethernet/cirrus/ep93xx_eth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/cirrus/ep93xx_eth.c +2 -4
@@ -476,8 +476,7 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep)if (d)dma_unmap_single (dev, d,PKT_BUF_SIZE ,DMA_FROM_DEVICE ); -if (ep->rx_buf[i] !=NULL ) -kfree (ep->rx_buf[i]); +kfree (ep->rx_buf[i]); }for (i =0 ; i <TX_QUEUE_ENTRIES ; i++) {
@@ -487,8 +486,7 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep)if (d)dma_unmap_single (dev, d,PKT_BUF_SIZE ,DMA_TO_DEVICE ); -if (ep->tx_buf[i] !=NULL ) -kfree (ep->tx_buf[i]); +kfree (ep->tx_buf[i]); } dma_free_coherent(dev, sizeof(struct ep93xx_descs), ep->descs,
Signature · 1 line
1.7.9.5
David Miller
maintainerAll of these NULL check removals are not bug fixes, and therefore not appropriate for the 'net' tree. They should be targetted at 'net-next' which is closed at this time.
Please resubmit your patches when I announce on netdev that 'net-next' is open for submissions once more.
Thanks.