diff options
-rw-r--r-- | net/ipv4/raw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8c1512021ee8..8d17dd3542df 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -514,7 +514,10 @@ done: kfree(ipc.opt); ip_rt_put(rt); -out: return err < 0 ? err : len; +out: + if (err < 0) + return err; + return len; do_confirm: dst_confirm(&rt->u.dst); @@ -610,7 +613,10 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, copied = skb->len; done: skb_free_datagram(sk, skb); -out: return err ? err : copied; +out: + if (err) + return err; + return copied; } static int raw_init(struct sock *sk) |