Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108453
b: refs/heads/master
c: 672c4e1
h: refs/heads/master
i:
  108451: e9ba50e
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Aug 14, 2008
1 parent db1864d commit 9dfd4c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: 1f1ba11b64947051fc32aa15fcccef6463b433f7
refs/heads/master: 672c4e1843c54227ff1bdf1fdd96f9c45c56aa85
15 changes: 9 additions & 6 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,11 @@ static int acm_probe (struct usb_interface *intf,
rcv->instance = acm;
}
for (i = 0; i < num_rx_buf; i++) {
struct acm_rb *buf = &(acm->rb[i]);
struct acm_rb *rb = &(acm->rb[i]);

if (!(buf->base = usb_buffer_alloc(acm->dev, readsize, GFP_KERNEL, &buf->dma))) {
rb->base = usb_buffer_alloc(acm->dev, readsize,
GFP_KERNEL, &rb->dma);
if (!rb->base) {
dev_dbg(&intf->dev, "out of memory (read bufs usb_buffer_alloc)\n");
goto alloc_fail7;
}
Expand Down Expand Up @@ -1172,6 +1174,7 @@ static int acm_probe (struct usb_interface *intf,
acm_set_line(acm, &acm->line);

usb_driver_claim_interface(&acm_driver, data_interface, acm);
usb_set_intfdata(data_interface, acm);

usb_get_intf(control_interface);
tty_register_device(acm_tty_driver, minor, &control_interface->dev);
Expand Down Expand Up @@ -1221,11 +1224,11 @@ static void acm_disconnect(struct usb_interface *intf)
struct acm *acm = usb_get_intfdata(intf);
struct usb_device *usb_dev = interface_to_usbdev(intf);

mutex_lock(&open_mutex);
if (!acm || !acm->dev) {
mutex_unlock(&open_mutex);
/* sibling interface is already cleaning up */
if (!acm)
return;
}

mutex_lock(&open_mutex);
if (acm->country_codes){
device_remove_file(&acm->control->dev,
&dev_attr_wCountryCodes);
Expand Down

0 comments on commit 9dfd4c8

Please sign in to comment.