Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361640
b: refs/heads/master
c: c93d819
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Greg Kroah-Hartman committed Mar 21, 2013
1 parent 623bf36 commit 7428687
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d93acbcacdec04dbdab0d1cc35457eb3bf1d2a38
refs/heads/master: c93d81955005c2ac0ea072f88d376026208410e1
19 changes: 17 additions & 2 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,8 @@ static int acm_probe(struct usb_interface *intf,
int num_rx_buf;
int i;
int combined_interfaces = 0;
struct device *tty_dev;
int rv = -ENOMEM;

/* normal quirks */
quirks = (unsigned long)id->driver_info;
Expand Down Expand Up @@ -1339,11 +1341,24 @@ static int acm_probe(struct usb_interface *intf,
usb_set_intfdata(data_interface, acm);

usb_get_intf(control_interface);
tty_port_register_device(&acm->port, acm_tty_driver, minor,
tty_dev = tty_port_register_device(&acm->port, acm_tty_driver, minor,
&control_interface->dev);
if (IS_ERR(tty_dev)) {
rv = PTR_ERR(tty_dev);
goto alloc_fail8;
}

return 0;
alloc_fail8:
if (acm->country_codes) {
device_remove_file(&acm->control->dev,
&dev_attr_wCountryCodes);
device_remove_file(&acm->control->dev,
&dev_attr_iCountryCodeRelDate);
}
device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities);
alloc_fail7:
usb_set_intfdata(intf, NULL);
for (i = 0; i < ACM_NW; i++)
usb_free_urb(acm->wb[i].urb);
alloc_fail6:
Expand All @@ -1359,7 +1374,7 @@ static int acm_probe(struct usb_interface *intf,
acm_release_minor(acm);
kfree(acm);
alloc_fail:
return -ENOMEM;
return rv;
}

static void stop_data_traffic(struct acm *acm)
Expand Down

0 comments on commit 7428687

Please sign in to comment.