tty: n_gsm: Fix bogus i++ in gsm_data_kick
authorGregory CLEMENT <gregory.clement@bootlin.com>
Mon, 18 May 2020 08:45:13 +0000 (10:45 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:26 +0000 (15:38 -0400)
commit707818ed1f56303c1cdffb9c3e9a320d4b793a0b
tree4211a590d7a380d71ebd4862cdbd473c129b3fe4
parent1d2deee6189aa3a18c4f9980e7ddc4796b739e87
tty: n_gsm: Fix bogus i++ in gsm_data_kick

[ Upstream commit 4dd31f1ffec6c370c3c2e0c605628bf5e16d5c46 ]

When submitting the previous fix "tty: n_gsm: Fix waking up upper tty
layer when room available". It was suggested to switch from a while to
a for loop, but when doing it, there was a remaining bogus i++.

This patch removes this i++ and also reorganizes the code making it more
compact.

Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20200518084517.2173242-3-gregory.clement@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/n_gsm.c