projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.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
|
blame
|
history
diff --git
a/drivers/usb/serial/visor.c
b/drivers/usb/serial/visor.c
index 1aa5d20a5d998d8d4511cae37d24620128f10474..8e2d6dd9add04678149ed605a21de3513a29ab0f 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);