diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-01-15 18:36:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 14:37:53 -0500 |
commit | 55b2afbb92ad92e9f6b0aa4354eb1c94589280c3 (patch) | |
tree | 41db1cac507028a166547365730b7b310769864d /drivers/usb/serial/cp210x.c | |
parent | 791b7d7cf69de11275e4dccec2f538eec02cbff6 (diff) |
USB: cp210x: call generic open last in open
Make sure port is fully initialised before calling generic open.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cp210x.c')
-rw-r--r-- | drivers/usb/serial/cp210x.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) | |||
410 | return result; | 410 | return result; |
411 | } | 411 | } |
412 | 412 | ||
413 | result = usb_serial_generic_open(tty, port); | ||
414 | if (result) | ||
415 | return result; | ||
416 | |||
417 | /* Configure the termios structure */ | 413 | /* Configure the termios structure */ |
418 | cp210x_get_termios(tty, port); | 414 | cp210x_get_termios(tty, port); |
419 | return 0; | 415 | |
416 | return usb_serial_generic_open(tty, port); | ||
420 | } | 417 | } |
421 | 418 | ||
422 | static void cp210x_close(struct usb_serial_port *port) | 419 | static void cp210x_close(struct usb_serial_port *port) |