mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
USB: visor: fix trivial accounting bug in visor driver
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>
This commit is contained in:
parent
63a9609513
commit
4c9fde9b86
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user