diff mbox series

[4/5] USB: serial: kobil_sct: log failure to update line settings

Message ID 20200701165342.15448-5-johan@kernel.org (mailing list archive)
State Mainlined
Commit c34a917aeff44fb5b2afeef7f5e946e4de405d5a
Headers show
Series USB: serial: W=1 related cleanups | expand

Commit Message

Johan Hovold July 1, 2020, 4:53 p.m. UTC
Log failure to update the line settings in set_termios().

This also avoids a W=1 (-Wunused-but-set-variable) warning.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/kobil_sct.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index e9882ba20933..79ce0219fdde 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -526,6 +526,10 @@  static void kobil_set_termios(struct tty_struct *tty,
 		  0,
 		  KOBIL_TIMEOUT
 		);
+	if (result) {
+		dev_err(&port->dev, "failed to update line settings: %d\n",
+				result);
+	}
 }
 
 static int kobil_ioctl(struct tty_struct *tty,