Make all previous callers to out simply return directly, as the out label only had return ret. Signed-off-by: Jon Kohler --- drivers/net/tun.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 8192740357a0..dcce49a26800 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2435,8 +2435,7 @@ static int tun_xdp_one(struct tun_struct *tun, build: skb = build_skb(xdp->data_hard_start, buflen); if (!skb) { - ret = -ENOMEM; - goto out; + return -ENOMEM; } skb_reserve(skb, xdp->data - xdp->data_hard_start); @@ -2455,8 +2454,7 @@ static int tun_xdp_one(struct tun_struct *tun, if (tun_vnet_hdr_tnl_to_skb(tun->flags, features, skb, tnl_hdr)) { atomic_long_inc(&tun->rx_frame_errors); kfree_skb(skb); - ret = -EINVAL; - goto out; + return -EINVAL; } skb->protocol = eth_type_trans(skb, tun->dev); @@ -2467,8 +2465,7 @@ static int tun_xdp_one(struct tun_struct *tun, if (skb_xdp) { ret = do_xdp_generic(xdp_prog, &skb); if (ret != XDP_PASS) { - ret = 0; - goto out; + return 0; } } @@ -2502,7 +2499,6 @@ static int tun_xdp_one(struct tun_struct *tun, if (rxhash) tun_flow_update(tun, rxhash, tfile); -out: return ret; } -- 2.43.0