[PATCH 1/1] drivers/net/ethernet/xilinx/ll_temac_main.c: remove null test before kfree

From: Fabian Frederick
Date: Tue Jun 17 2014 - 15:28:58 EST


Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Michal Simek <michal.simek@xxxxxxxxxx>
Cc: Grant Likely <grant.likely@xxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
drivers/net/ethernet/xilinx/ll_temac_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 4ef818a..21b6e297 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -224,8 +224,7 @@ static void temac_dma_bd_release(struct net_device *ndev)
dma_free_coherent(ndev->dev.parent,
sizeof(*lp->tx_bd_v) * TX_BD_NUM,
lp->tx_bd_v, lp->tx_bd_p);
- if (lp->rx_skb)
- kfree(lp->rx_skb);
+ kfree(lp->rx_skb);
}

/**
--
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/