Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c9fde9b authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

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: default avatarOliver Neukum <oliver@neukum.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 63a96095
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -513,6 +513,7 @@ static void visor_read_bulk_callback(struct urb *urb)
			tty_kref_put(tty);
		}
		spin_lock(&priv->lock);
		if (tty)
			priv->bytes_in += available_room;

	} else {