提交 4c9fde9b 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

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: NOliver Neukum <oliver@neukum.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 63a96095
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册