From: Rémi Denis-Courmont Date: Mon, 30 Aug 2010 12:57:04 +0000 (+0000) Subject: Phonet: correct sendmsg() error code from sock_alloc_send_skb() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02ac3268a581639af241c254579160909373e12c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Phonet: correct sendmsg() error code from sock_alloc_send_skb() Signed-off-by: Rémi Denis-Courmont Signed-off-by: David S. Miller --- diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 5034f0f62bdb..04e34196c9de 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c @@ -876,7 +876,7 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk, skb = sock_alloc_send_skb(sk, MAX_PNPIPE_HEADER + len, flags & MSG_DONTWAIT, &err); if (!skb) - return -ENOBUFS; + return err; skb_reserve(skb, MAX_PHONET_HEADER + 3); err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);