Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca85485c authored by Paul Fulghum's avatar Paul Fulghum Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: console: prevent ENODEV on node



Prevent ENODEV on a /dev/ttyUSBx, used as a USB-serial console.

From: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 57845bd1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -201,13 +201,13 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
	 
	++port->open_count;

	if (port->open_count == 1) {

	/* set up our port structure making the tty driver
	 * remember our port object, and us it */
	tty->driver_data = port;
	port->tty = tty;

	if (port->open_count == 1) {

		/* lock this module before we call it
		 * this may fail, which means we must bail out,
		 * safe because we are called with BKL held */