projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f26c288
)
USB: ir-usb: fix incorrect write-buffer length
author
Johan Hovold
<
[email protected]
>
Tue, 18 May 2010 22:01:34 +0000
(
00:01
+0200)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 20 May 2010 20:21:50 +0000
(13:21 -0700)
Returned length should include header length.
Signed-off-by: Johan Hovold <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/serial/ir-usb.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/ir-usb.c
b/drivers/usb/serial/ir-usb.c
index e7087f9fe479fd3eb995a19e2aa36d75a6e401f2..ccbce4066d04899dcf0c2d233926fd7c36091ec8 100644
(file)
--- a/
drivers/usb/serial/ir-usb.c
+++ b/
drivers/usb/serial/ir-usb.c
@@
-307,6
+307,7
@@
static int ir_prepare_write_buffer(struct usb_serial_port *port,
void *dest, size_t size)
{
unsigned char *buf = dest;
+ int count;
/*
* The first byte of the packet we send to the device contains an
@@
-317,8
+318,9
@@
static int ir_prepare_write_buffer(struct usb_serial_port *port,
*/
*buf = ir_xbof | ir_baud;
-
return
kfifo_out_locked(&port->write_fifo, buf + 1, size - 1,
+
count =
kfifo_out_locked(&port->write_fifo, buf + 1, size - 1,
&port->lock);
+ return count + 1;
}
static void ir_process_read_urb(struct urb *urb)