ChangeSet 1.1760.26.4, 2004/06/23 15:41:08-07:00, oliver@neukum.org [PATCH] USB: another error check in acm I overlooked that setting control lines in open can fail. - check for error doing control transfers Signed-Off-By: Oliver Neukum Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c 2004-06-29 16:26:38 -07:00 +++ b/drivers/usb/class/cdc-acm.c 2004-06-29 16:26:38 -07:00 @@ -293,7 +293,8 @@ goto bail_out_and_unlink; } - acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS); + if (0 > acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS)) + goto full_bailout; /* force low_latency on so that our tty_push actually forces the data through, otherwise it is scheduled, and with high data rates data can get lost. */ @@ -304,6 +305,8 @@ up(&open_sem); return 0; +full_bailout: + usb_unlink_urb(acm->readurb); bail_out_and_unlink: usb_unlink_urb(acm->ctrlurb); bail_out: