]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: rswitch: Fix return value in rswitch_start_xmit()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 22 Nov 2023 05:11:42 +0000 (14:11 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Nov 2023 01:52:35 +0000 (01:52 +0000)
This .ndo_start_xmit() function should return netdev_tx_t value,
not -ENOMEM. So, fix it.

Fixes: 33f5d733b589 ("net: renesas: rswitch: Improve TX timestamp accuracy")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/rswitch.c

index d53d9002090421037ae5b35732b43cfeaa9b138a..45bf9808c143e1ac7fbc1899d02950a32de760e0 100644 (file)
@@ -1535,7 +1535,7 @@ static netdev_tx_t rswitch_start_xmit(struct sk_buff *skb, struct net_device *nd
                ts_info = kzalloc(sizeof(*ts_info), GFP_ATOMIC);
                if (!ts_info) {
                        dma_unmap_single(ndev->dev.parent, dma_addr, skb->len, DMA_TO_DEVICE);
-                       return -ENOMEM;
+                       return ret;
                }
 
                skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;