diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-10 13:39:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 22:13:21 +0300 |
commit | e67d7f60d2382677c25de10b2e4d8d3717ace91f (patch) | |
tree | 852ae27d72f8717cb75485609ccccc59366f161b /Documentation/devicetree/bindings/serial | |
parent | c70fd7c0e905b0a13b2d941f558d47105cb75821 (diff) | |
download | linux-e67d7f60d2382677c25de10b2e4d8d3717ace91f.tar.xz |
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: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ilpo 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/devicetree/bindings/serial')
0 files changed, 0 insertions, 0 deletions