stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree
@ 2016-11-07 16:50 gregkh
  2016-11-07 18:24 ` [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2016-11-07 16:50 UTC (permalink / raw)
  To: johan, stable; +Cc: stable


The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From de24e0a108bc48062e1c7acaa97014bce32a919f Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Wed, 19 Oct 2016 15:45:07 +0200
Subject: [PATCH] USB: serial: cp210x: fix tiocmget error handling

The current tiocmget implementation would fail to report errors up the
stack and instead leaked a few bits from the stack as a mask of
modem-status flags.

Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 54a4de0efdba..f61477bed3a8 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)
 	u8 control;
 	int result;
 
-	cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+	result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+	if (result)
+		return result;
 
 	result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
 		|((control & CONTROL_RTS) ? TIOCM_RTS : 0)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-08 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 16:50 FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree gregkh
2016-11-07 18:24 ` [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling Johan Hovold
2016-11-08 10:33   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).