Skip to content
Commit e67d7f60 authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman
Browse files

tty: gdm724x: simplify gdm_tty_write()



len and remain can never be negative in gdm_tty_write(). So remove such
a check and move the check of remaining bytes to the loop condition.
This way, the preceding 'if' is now superfluous too. Fix all that and
make the code cleaner.

Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Cc: linux-staging@lists.linux.dev
Link: https://lore.kernel.org/r/20230810103900.19353-1-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c70fd7c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment