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

Commit b58a6462 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: iuu_phoenix: forward USB errors to USB serial core



Forward errors from usb_submit_urb in open.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2479e2a9
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1168,15 +1168,14 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
			  port->write_urb->transfer_buffer, 1,
			  port->write_urb->transfer_buffer, 1,
			  read_rxcmd_callback, port);
			  read_rxcmd_callback, port);
	result = usb_submit_urb(port->write_urb, GFP_KERNEL);
	result = usb_submit_urb(port->write_urb, GFP_KERNEL);

	if (result) {
	if (result) {
		dev_err(&port->dev, "%s - failed submitting read urb,"
		dev_err(&port->dev, "%s - failed submitting read urb,"
			" error %d\n", __func__, result);
			" error %d\n", __func__, result);
		iuu_close(port);
		iuu_close(port);
		return -EPROTO;
	} else {
	} else {
		dbg("%s - rxcmd OK", __func__);
		dbg("%s - rxcmd OK", __func__);
	}
	}

	return result;
	return result;
}
}