Return errors from usb_submit_urb rather than EPROTO on errors in open.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
if (result) {
pl2303_close(port);
- return -EPROTO;
+ return result;
}
dbg("%s - submitting interrupt urb", __func__);
dev_err(&port->dev, "%s - failed submitting interrupt urb,"
" error %d\n", __func__, result);
pl2303_close(port);
- return -EPROTO;
+ return result;
}
port->port.drain_delay = 256;
return 0;