From: Alan Cox <alan@redhat.com>
Date: Mon, 30 Jun 2008 16:40:08 +0000 (+0100)
Subject: tty: Fix inverted logic in send_break
X-Git-Tag: firefly_0821_release~19846
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3e2a078ca6a0d3122bbf2b904cd7ccf21a5ca21d;p=firefly-linux-kernel-4.4.55.git

tty: Fix inverted logic in send_break

Not sure how this came to get inverted but it appears to have been my
mess up.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e94bee032314..750131010af0 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3322,7 +3322,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
 		msleep_interruptible(duration);
 	tty->ops->break_ctl(tty, 0);
 	tty_write_unlock(tty);
-	if (!signal_pending(current))
+	if (signal_pending(current))
 		return -EINTR;
 	return 0;
 }