Commit 2311ac09 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[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: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent c87ed958
......@@ -293,7 +293,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
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 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
up(&open_sem);
return 0;
full_bailout:
usb_unlink_urb(acm->readurb);
bail_out_and_unlink:
usb_unlink_urb(acm->ctrlurb);
bail_out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment