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-Tag: firefly_0821_release~7613^2~3670^2~624 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02ac3268a581639af241c254579160909373e12c;p=firefly-linux-kernel-4.4.55.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);