UPSTREAM: regulator: pwm: Prints error number along with detail
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp_output.c
index ca3731721d81dac1b73ef94aee51ac2b4e3834e4..8a62ad0c850b91f30a29c97ec7bf895919ddc81d 100644 (file)
@@ -2383,9 +2383,11 @@ u32 __tcp_select_window(struct sock *sk)
        int full_space = min_t(int, tp->window_clamp, allowed_space);
        int window;
 
-       if (mss > full_space)
+       if (unlikely(mss > full_space)) {
                mss = full_space;
-
+               if (mss <= 0)
+                       return 0;
+       }
        if (free_space < (full_space >> 1)) {
                icsk->icsk_ack.quick = 0;