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

Commit 7af348be authored by Markus Elfring's avatar Markus Elfring Committed by David S. Miller
Browse files

net: ep93xx_eth: Delete unnecessary checks before the function call "kfree"



The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27b917e5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -475,7 +475,6 @@ 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]);
	}

@@ -486,7 +485,6 @@ 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]);
	}