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

Commit 0f817a5e authored by Markus Elfring's avatar Markus Elfring Committed by David S. Miller
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d3ee8ec7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -509,7 +509,6 @@ HDLC_irq_xpr(struct bchannel *bch)
	if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) {
		hdlc_fill_fifo(bch);
	} else {
		if (bch->tx_skb)
		dev_kfree_skb(bch->tx_skb);
		if (get_next_bframe(bch)) {
			hdlc_fill_fifo(bch);
+2 −4
Original line number Diff line number Diff line
@@ -1119,7 +1119,6 @@ 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);
		if (get_next_bframe(bch))
			hfcpci_fill_fifo(bch);
@@ -1132,7 +1131,6 @@ 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);
		if (get_next_dframe(dch))
			hfcpci_fill_dfifo(dch->hw);
+4 −8
Original line number Diff line number Diff line
@@ -190,7 +190,6 @@ isac_rme_irq(struct isac_hw *isac)
#endif
		}
		WriteISAC(isac, ISAC_CMDR, 0x80);
		if (isac->dch.rx_skb)
		dev_kfree_skb(isac->dch.rx_skb);
		isac->dch.rx_skb = NULL;
	} else {
@@ -210,7 +209,6 @@ isac_xpr_irq(struct isac_hw *isac)
	if (isac->dch.tx_skb && isac->dch.tx_idx < isac->dch.tx_skb->len) {
		isac_fill_fifo(isac);
	} else {
		if (isac->dch.tx_skb)
		dev_kfree_skb(isac->dch.tx_skb);
		if (get_next_dframe(&isac->dch))
			isac_fill_fifo(isac);
@@ -464,7 +462,6 @@ isacsx_rme_irq(struct isac_hw *isac)
			isac->dch.err_crc++;
#endif
		WriteISAC(isac, ISACX_CMDRD, ISACX_CMDRD_RMC);
		if (isac->dch.rx_skb)
		dev_kfree_skb(isac->dch.rx_skb);
		isac->dch.rx_skb = NULL;
	} else {
@@ -1012,7 +1009,6 @@ hscx_xpr(struct hscx_hw *hx)
	if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) {
		hscx_fill_fifo(hx);
	} else {
		if (hx->bch.tx_skb)
		dev_kfree_skb(hx->bch.tx_skb);
		if (get_next_bframe(&hx->bch)) {
			hscx_fill_fifo(hx);
+1 −2
Original line number Diff line number Diff line
@@ -690,7 +690,6 @@ send_next(struct isar_ch *ch)
			}
		}
	}
	if (ch->bch.tx_skb)
	dev_kfree_skb(ch->bch.tx_skb);
	if (get_next_bframe(&ch->bch)) {
		isar_fill_fifo(ch);
+1 −2
Original line number Diff line number Diff line
@@ -605,7 +605,6 @@ bc_next_frame(struct tiger_ch *bc)
	if (bc->bch.tx_skb && bc->bch.tx_idx < bc->bch.tx_skb->len) {
		fill_dma(bc);
	} else {
		if (bc->bch.tx_skb)
		dev_kfree_skb(bc->bch.tx_skb);
		if (get_next_bframe(&bc->bch)) {
			fill_dma(bc);
Loading