From: Thierry Reding <tred...@nvidia.com>

Taking the address of an element within a non-NULL array will never be
zero. This condition isn't checked anywhere else, so drop it in these
two instances as well.

Signed-off-by: Thierry Reding <tred...@nvidia.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c78f444ad423..106ace3781b3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1332,9 +1332,6 @@ static void free_rx_dma_desc_resources(struct stmmac_priv 
*priv)
        for (queue = 0; queue < rx_count; queue++) {
                struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
 
-               if (!rx_q)
-                       break;
-
                /* Release the DMA RX socket buffers */
                dma_free_rx_skbufs(priv, queue);
 
@@ -1373,9 +1370,6 @@ static void free_tx_dma_desc_resources(struct stmmac_priv 
*priv)
        for (queue = 0; queue < tx_count; queue++) {
                struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
 
-               if (!tx_q)
-                       break;
-
                /* Release the DMA TX socket buffers */
                dma_free_tx_skbufs(priv, queue);
 
-- 
2.12.0

Reply via email to