diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-08-21 20:10:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-22 16:22:03 -0700 |
commit | 0f817a5eb9e33cec5baf9dc265bdf240b03cf51b (patch) | |
tree | 356976032586241d3c12d7b1172a1bc0b2a6aeb2 /drivers/isdn/hardware/mISDN/hfcpci.c | |
parent | d3ee8ec7de83abf4325c11bcd36cbd01d7a66789 (diff) | |
download | linux-0f817a5eb9e33cec5baf9dc265bdf240b03cf51b.tar.gz |
mISDN: 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/isdn/hardware/mISDN/hfcpci.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 4a069582fc6b..2330a7d24267 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -1119,8 +1119,7 @@ tx_birq(struct bchannel *bch) if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) hfcpci_fill_fifo(bch); else { - if (bch->tx_skb) - dev_kfree_skb(bch->tx_skb); + dev_kfree_skb(bch->tx_skb); if (get_next_bframe(bch)) hfcpci_fill_fifo(bch); } @@ -1132,8 +1131,7 @@ tx_dirq(struct dchannel *dch) if (dch->tx_skb && dch->tx_idx < dch->tx_skb->len) hfcpci_fill_dfifo(dch->hw); else { - if (dch->tx_skb) - dev_kfree_skb(dch->tx_skb); + dev_kfree_skb(dch->tx_skb); if (get_next_dframe(dch)) hfcpci_fill_dfifo(dch->hw); } |