This is a note to let you know that I've just added the patch titled wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: wilc1000-let-wilc_mac_xmit-return-netdev_tx_ok.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit d6c3cd2c0d2059ec6dede3ae4755165e32430103 Author: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> Date: Mon Jun 29 12:40:09 2020 +0200 wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK [ Upstream commit cce0e08301fe43dc3fe983d5f098393d15f803f0 ] The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type defining 'NETDEV_TX_OK' but this driver returns '0' instead of 'NETDEV_TX_OK'. Fix this by returning 'NETDEV_TX_OK' instead of '0'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20200629104009.84077-1-luc.vanoostenryck@xxxxxxxxx Stable-dep-of: deb962ec9e1c ("wifi: wilc1000: fix potential memory leak in wilc_mac_xmit()") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c index 508acb8bb089f..c8cf88258d06d 100644 --- a/drivers/staging/wilc1000/wilc_netdev.c +++ b/drivers/staging/wilc1000/wilc_netdev.c @@ -717,14 +717,14 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) if (skb->dev != ndev) { netdev_err(ndev, "Packet not destined to this device\n"); - return 0; + return NETDEV_TX_OK; } tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC); if (!tx_data) { dev_kfree_skb(skb); netif_wake_queue(ndev); - return 0; + return NETDEV_TX_OK; } tx_data->buff = skb->data; @@ -748,7 +748,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) mutex_unlock(&wilc->vif_mutex); } - return 0; + return NETDEV_TX_OK; } static int wilc_mac_close(struct net_device *ndev)