提交 02ac3268 编写于 作者: R Rémi Denis-Courmont 提交者: David S. Miller

Phonet: correct sendmsg() error code from sock_alloc_send_skb()

Signed-off-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1a98214f
...@@ -876,7 +876,7 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk, ...@@ -876,7 +876,7 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk,
skb = sock_alloc_send_skb(sk, MAX_PNPIPE_HEADER + len, skb = sock_alloc_send_skb(sk, MAX_PNPIPE_HEADER + len,
flags & MSG_DONTWAIT, &err); flags & MSG_DONTWAIT, &err);
if (!skb) if (!skb)
return -ENOBUFS; return err;
skb_reserve(skb, MAX_PHONET_HEADER + 3); skb_reserve(skb, MAX_PHONET_HEADER + 3);
err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len); err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册