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

Commit ecc463f1 authored by Aditya Mathur's avatar Aditya Mathur
Browse files

usb: gadget: u_ether: Fix skb free warning



Using dev_kfree_skb_any to free skb in interrupt
context to avoid runtime warning.

Change-Id: I5a7fde9c36d924c65f5ec0d8cb995db08e30d022
Signed-off-by: default avatarAditya Mathur <aditmath@codeaurora.org>
parent d0e241fe
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -760,7 +760,8 @@ static void tx_complete(struct usb_ep *ep, struct usb_request *req)
		dev->tx_aggr_cnt[n-1]++;
		dev->tx_aggr_cnt[n-1]++;


		/* sg_ctx is only accessible here, can use lock-free version */
		/* sg_ctx is only accessible here, can use lock-free version */
		__skb_queue_purge(&sg_ctx->skbs);
		while ((skb = __skb_dequeue(&sg_ctx->skbs)) != NULL)
			dev_kfree_skb_any(skb);
	}
	}


	dev->net->stats.tx_packets += n;
	dev->net->stats.tx_packets += n;