OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63a9609
)
USB: visor: fix trivial accounting bug in visor driver
author
Oliver Neukum
<oliver@neukum.org>
Thu, 1 Oct 2009 12:54:46 +0000
(14:54 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 9 Oct 2009 20:52:08 +0000
(13:52 -0700)
usb:usbserial:visor: fix accounting in error case
data not pushed to the tty layer due to an error mustn't be counted
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/visor.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/visor.c
b/drivers/usb/serial/visor.c
index
1aa5d20
..
8e2d6dd
100644
(file)
--- a/
drivers/usb/serial/visor.c
+++ b/
drivers/usb/serial/visor.c
@@
-513,7
+513,8
@@
static void visor_read_bulk_callback(struct urb *urb)
tty_kref_put(tty);
}
spin_lock(&priv->lock);
- priv->bytes_in += available_room;
+ if (tty)
+ priv->bytes_in += available_room;
} else {
spin_lock(&priv->lock);