* [PATCH] cirrus: Remove redundant NULL check before kfree
@ 2013-02-26 19:49 Syam Sidhardhan
2013-02-26 22:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Syam Sidhardhan @ 2013-02-26 19:49 UTC (permalink / raw)
To: netdev; +Cc: syamsidhardh, hsweeten
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
drivers/net/ethernet/cirrus/ep93xx_eth.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 354cbb7..298aaa9 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -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,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cirrus: Remove redundant NULL check before kfree
2013-02-26 19:49 [PATCH] cirrus: Remove redundant NULL check before kfree Syam Sidhardhan
@ 2013-02-26 22:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-02-26 22:20 UTC (permalink / raw)
To: syamsidhardh; +Cc: netdev, hsweeten
All 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-26 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 19:49 [PATCH] cirrus: Remove redundant NULL check before kfree Syam Sidhardhan
2013-02-26 22:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).