Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185303
b: refs/heads/master
c: d212632
h: refs/heads/master
i:
  185301: eec5881
  185299: aee9dab
  185295: fc593f7
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 7d2e1f3 commit 5cb7941
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 9e221a35f82cbef0397d81fed588bafba95b550c
refs/heads/master: d2126326bd71b56fcaa5e86474433d11e253f84d
13 changes: 10 additions & 3 deletions trunk/drivers/usb/serial/oti6858.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void send_data(struct work_struct *work)
struct usb_serial_port *port = priv->port;
int count = 0, result;
unsigned long flags;
unsigned char allow;
u8 *allow;

dbg("%s(port = %d)", __func__, port->number);

Expand All @@ -321,13 +321,20 @@ void send_data(struct work_struct *work)
count = port->bulk_out_size;

if (count != 0) {
allow = kmalloc(1, GFP_KERNEL);
if (!allow) {
dev_err(&port->dev, "%s(): kmalloc failed\n",
__func__);
return;
}
result = usb_control_msg(port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0),
OTI6858_REQ_T_CHECK_TXBUFF,
OTI6858_REQ_CHECK_TXBUFF,
count, 0, &allow, 1, 100);
if (result != 1 || allow != 0)
count, 0, allow, 1, 100);
if (result != 1 || *allow != 0)
count = 0;
kfree(allow);
}

if (count == 0) {
Expand Down

0 comments on commit 5cb7941

Please sign in to comment.