diff mbox series

mt76: use skb_pad() instead of __skb_pad()

Message ID 20180925195251.10568-1-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series mt76: use skb_pad() instead of __skb_pad() | expand

Commit Message

Hauke Mehrtens Sept. 25, 2018, 7:52 p.m. UTC
mt76 uses __skb_pad() with free_on_error set to true, this is the same
as calling skb_pad().
This patch does not change any functionality, but it makes it easier to
backport this driver in backports, because skb_pad() is also available
in older kernel versions.

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/mediatek/mt76/usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Felix Fietkau Sept. 26, 2018, 3:35 p.m. UTC | #1
On 2018-09-25 21:52, Hauke Mehrtens wrote:
> mt76 uses __skb_pad() with free_on_error set to true, this is the same
> as calling skb_pad().
> This patch does not change any functionality, but it makes it easier to
> backport this driver in backports, because skb_pad() is also available
> in older kernel versions.
> 
> Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Merged, thanks.

- Felix
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 7780b07543bb..e03de13f5afe 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -535,7 +535,7 @@  int mt76u_skb_dma_info(struct sk_buff *skb, int port, u32 flags)
 	}
 
 	if (unlikely(pad)) {
-		if (__skb_pad(last, pad, true))
+		if (skb_pad(last, pad))
 			return -ENOMEM;
 		__skb_put(last, pad);
 	}