From: Johan Hovold Date: Sun, 15 Jan 2012 23:36:48 +0000 (+0100) Subject: USB: cp210x: call generic open last in open X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=55b2afbb92ad92e9f6b0aa4354eb1c94589280c3;p=linux-beck.git USB: cp210x: call generic open last in open Make sure port is fully initialised before calling generic open. Signed-off-by: Johan Hovold Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index c2b5d4a09b16..bb4290bfe59d 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -410,13 +410,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) return result; } - result = usb_serial_generic_open(tty, port); - if (result) - return result; - /* Configure the termios structure */ cp210x_get_termios(tty, port); - return 0; + + return usb_serial_generic_open(tty, port); } static void cp210x_close(struct usb_serial_port *port)