Phonet: correct sendmsg() error code from sock_alloc_send_skb()
Rémi Denis-Courmont [Mon, 30 Aug 2010 12:57:04 +0000 (12:57 +0000)]
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

net/phonet/pep.c

index 5034f0f..04e3419 100644 (file)
@@ -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);