diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index abecf2d422ff..6d4d2b0063aa 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -969,7 +969,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, | |||
969 | restart: | 969 | restart: |
970 | if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && | 970 | if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && |
971 | (flags & MSG_DONTWAIT))) { | 971 | (flags & MSG_DONTWAIT))) { |
972 | res = (sz_copied == 0) ? -EWOULDBLOCK : 0; | 972 | res = -EWOULDBLOCK; |
973 | goto exit; | 973 | goto exit; |
974 | } | 974 | } |
975 | 975 | ||
@@ -1060,7 +1060,7 @@ restart: | |||
1060 | 1060 | ||
1061 | exit: | 1061 | exit: |
1062 | up(&tsock->sem); | 1062 | up(&tsock->sem); |
1063 | return res ? res : sz_copied; | 1063 | return sz_copied ? sz_copied : res; |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | /** | 1066 | /** |