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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 May 2020 14:19:54 +0000 (16:19 +0200)
commit4dd31f1ffec6c370c3c2e0c605628bf5e16d5c46
tree0b9dbb07684ca0403ed983570a0880f946e72473
parent57626ff1c9135211b92dfbea1923333c7b6dd12c
tty: n_gsm: Fix bogus i++ in gsm_data_kick

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>
drivers/tty/n_gsm.c