Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97508
b: refs/heads/master
c: 501a525
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed May 30, 2008
1 parent f9ecff7 commit e8207ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 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: 471637a575329f9250e7e4099e84084820a35e11
refs/heads/master: 501a5250589be41c4c060afa855bc60b4539a340
17 changes: 7 additions & 10 deletions trunk/drivers/input/tablet/gtco.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
struct gtco *gtco;
struct input_dev *input_dev;
struct hid_descriptor *hid_desc;
char *report = NULL;
char *report;
int result = 0, retry;
int error;
struct usb_endpoint_descriptor *endpoint;
Expand Down Expand Up @@ -916,25 +916,23 @@ static int gtco_probe(struct usb_interface *usbinterface,
le16_to_cpu(hid_desc->wDescriptorLength),
5000); /* 5 secs */

if (result == le16_to_cpu(hid_desc->wDescriptorLength))
dbg("usb_control_msg result: %d", result);
if (result == le16_to_cpu(hid_desc->wDescriptorLength)) {
parse_hid_report_descriptor(gtco, report, result);
break;
}
}

kfree(report);

/* If we didn't get the report, fail */
dbg("usb_control_msg result: :%d", result);
if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
err("Failed to get HID Report Descriptor of size: %d",
hid_desc->wDescriptorLength);
error = -EIO;
goto err_free_urb;
}

/* Now we parse the report */
parse_hid_report_descriptor(gtco, report, result);

/* Now we delete it */
kfree(report);

/* Create a device file node */
usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath));
strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath));
Expand Down Expand Up @@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE,
gtco->buffer, gtco->buf_dma);
err_free_devs:
kfree(report);
input_free_device(input_dev);
kfree(gtco);
return error;
Expand Down

0 comments on commit e8207ec

Please sign in to comment.