From: Allan Stephens <[EMAIL PROTECTED]> Signed-off-by: Allan Stephens <[EMAIL PROTECTED]> Signed-off-by: Per Liden <[EMAIL PROTECTED]> --- 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 abecf2d..6d4d2b0 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -969,7 +969,7 @@ static int recv_stream(struct kiocb *ioc restart: if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && (flags & MSG_DONTWAIT))) { - res = (sz_copied == 0) ? -EWOULDBLOCK : 0; + res = -EWOULDBLOCK; goto exit; } @@ -1060,7 +1060,7 @@ restart: exit: up(&tsock->sem); - return res ? res : sz_copied; + return sz_copied ? sz_copied : res; } /** -- 1.4.0 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html