diff --git a/net/tcp/tcp_recvfrom.c b/net/tcp/tcp_recvfrom.c index 386687e012..64e42394fe 100644 --- a/net/tcp/tcp_recvfrom.c +++ b/net/tcp/tcp_recvfrom.c @@ -555,7 +555,7 @@ static ssize_t tcp_recvfrom_result(int result, struct tcp_recvfrom_s *pstate) * handler error is prioritized over any previous error. */ - return (pstate->ir_result <= 0) ? pstate->ir_result : result; + return (pstate->ir_result < 0) ? pstate->ir_result : result; } /****************************************************************************