summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-29 13:40:09 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-07-14 20:53:29 +0300
commitcce0e08301fe43dc3fe983d5f098393d15f803f0 (patch)
treef1cc4a374885e4c7822491422caad2fc269d16bb /drivers/net
parentb52b331a8978ab5414fc68bb4a73e690f080549e (diff)
downloadlinux-cce0e08301fe43dc3fe983d5f098393d15f803f0.tar.xz
wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK
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@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200629104009.84077-1-luc.vanoostenryck@gmail.com
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/netdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c
index 198354670fe1..20615c7ec168 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
@@ -684,14 +684,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;
@@ -716,7 +716,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
srcu_read_unlock(&wilc->srcu, srcu_idx);
}
- return 0;
+ return NETDEV_TX_OK;
}
static int wilc_mac_close(struct net_device *ndev)