Skip to content

Commit

Permalink
USB: cp210x: call generic open last in open
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jan 24, 2012
1 parent 791b7d7 commit 55b2afb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 55b2afb

Please sign in to comment.