aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-03-02 07:22:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 09:34:09 +0100
commit6bfbfcfc58005ee12d37b56a5e722618ef6bee8f (patch)
treea9cbd9e585a4d35f4df4950968a1dd7082efc7c8 /drivers/staging/gdm724x
parenttty: make everyone's chars_in_buffer return >= 0 (diff)
downloadlinux-dev-6bfbfcfc58005ee12d37b56a5e722618ef6bee8f.tar.xz
linux-dev-6bfbfcfc58005ee12d37b56a5e722618ef6bee8f.zip
tty: make everyone's write_room return >= 0
The tty line disciplines don't expect tty_operations::write_room to return negative values. Fix the five drivers which violate this. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210302062214.29627-44-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x')
-rw-r--r--drivers/staging/gdm724x/gdm_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 6e813693a766..0ccc8c24e754 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -188,7 +188,7 @@ static int gdm_tty_write_room(struct tty_struct *tty)
struct gdm *gdm = tty->driver_data;
if (!GDM_TTY_READY(gdm))
- return -ENODEV;
+ return 0;
return WRITE_SIZE;
}