Loading net/tipc/socket.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -969,7 +969,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, restart: restart: if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && (flags & MSG_DONTWAIT))) { (flags & MSG_DONTWAIT))) { res = (sz_copied == 0) ? -EWOULDBLOCK : 0; res = -EWOULDBLOCK; goto exit; goto exit; } } Loading Loading @@ -1060,7 +1060,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, exit: exit: up(&tsock->sem); up(&tsock->sem); return res ? res : sz_copied; return sz_copied ? sz_copied : res; } } /** /** Loading Loading
net/tipc/socket.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -969,7 +969,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, restart: restart: if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && (flags & MSG_DONTWAIT))) { (flags & MSG_DONTWAIT))) { res = (sz_copied == 0) ? -EWOULDBLOCK : 0; res = -EWOULDBLOCK; goto exit; goto exit; } } Loading Loading @@ -1060,7 +1060,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, exit: exit: up(&tsock->sem); up(&tsock->sem); return res ? res : sz_copied; return sz_copied ? sz_copied : res; } } /** /** Loading