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

Commit 2f9889a2 authored by David S. Miller's avatar David S. Miller
Browse files

Revert "hso: Fix crashes on close."



This reverts commit 4a3e8181.

On request from Alan Cox.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab153d84
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -1235,11 +1235,6 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
	}

	mutex_lock(&serial->parent->mutex);
	/* check for port already opened, if not set the termios */
	/* The serial->open count needs to be here as hso_serial_close
	 *  will be called even if hso_serial_open returns -ENODEV.
	 */
	serial->open_count++;
	result = usb_autopm_get_interface(serial->parent->interface);
	if (result < 0)
		goto err_out;
@@ -1251,6 +1246,8 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
	tty->driver_data = serial;
	serial->tty = tty;

	/* check for port already opened, if not set the termios */
	serial->open_count++;
	if (serial->open_count == 1) {
		tty->low_latency = 1;
		serial->rx_state = RX_IDLE;
@@ -1288,10 +1285,6 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
	u8 usb_gone;

	D1("Closing serial port");
	if (serial == NULL || serial->magic != HSO_SERIAL_MAGIC) {
		D1("invalid serial structure bailing out.\n");
		return;
	}

	mutex_lock(&serial->parent->mutex);
	usb_gone = serial->parent->usb_gone;