Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317057
b: refs/heads/master
c: d25d5f2
h: refs/heads/master
i:
  317055: c31ed1a
v: v3
  • Loading branch information
Bjørn Mork authored and Greg Kroah-Hartman committed Jul 17, 2012
1 parent 88efdcf commit 7a9831d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 2cf69930f03af63731678de79cb1dbe3547a5938
refs/heads/master: d25d5f28828708b81658cff6f676b710c7ee171d
17 changes: 8 additions & 9 deletions trunk/drivers/usb/serial/qcserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) {
dev_dbg(dev, "QDL port found\n");

if (serial->interface->num_altsetting == 1) {
if (serial->interface->num_altsetting == 1)
retval = 0; /* Success */
break;
}
altsetting = 1;
else
altsetting = 1;
}
break;

Expand Down Expand Up @@ -203,8 +202,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)

default:
dev_err(dev, "unknown number of interfaces: %d\n", nintf);
kfree(data);
retval = -ENODEV;
}

if (altsetting >= 0) {
Expand All @@ -214,13 +211,15 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
"Could not set interface, error %d\n",
retval);
retval = -ENODEV;
kfree(data);
}
}

/* Set serial->private if not returning -ENODEV */
if (retval != -ENODEV)
/* Set serial->private if not returning error */
if (retval == 0)
usb_set_serial_data(serial, data);
else
kfree(data);

return retval;
}

Expand Down

0 comments on commit 7a9831d

Please sign in to comment.