diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-08-22 20:02:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-22 16:22:04 -0700 |
commit | 399e06a517b6f1da5f617d413f6e5489f5054f7a (patch) | |
tree | 6d406a7734d005746d300bd75f332dae2c961b01 /drivers/net/ethernet/micrel | |
parent | 5477fccf9abd7342a987d401fa50c0d93ebd09b9 (diff) | |
download | linux-stable-399e06a517b6f1da5f617d413f6e5489f5054f7a.tar.gz linux-stable-399e06a517b6f1da5f617d413f6e5489f5054f7a.tar.bz2 linux-stable-399e06a517b6f1da5f617d413f6e5489f5054f7a.zip |
ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation.
Thus the test around the shown calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ks8842.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/micrel/ks8842.c b/drivers/net/ethernet/micrel/ks8842.c index ccd06702cc56..da329ca115cc 100644 --- a/drivers/net/ethernet/micrel/ks8842.c +++ b/drivers/net/ethernet/micrel/ks8842.c @@ -580,9 +580,7 @@ out: dma_unmap_single(adapter->dev, sg_dma_address(sg), DMA_BUFFER_SIZE, DMA_FROM_DEVICE); sg_dma_address(sg) = 0; - if (ctl->skb) - dev_kfree_skb(ctl->skb); - + dev_kfree_skb(ctl->skb); ctl->skb = NULL; printk(KERN_ERR DRV_NAME": Failed to start RX DMA: %d\n", err); |