From 7c7540aa9e3a8d7440c7b6029cc82da703d4a826 Mon Sep 17 00:00:00 2001 From: Artem Mygaiev Date: Tue, 10 Nov 2020 16:38:13 +0000 Subject: [PATCH] Return 0 space instead of -EINVAL when there are no readers --- module/tty0tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tty0tty.c b/module/tty0tty.c index f40d1ff..ab89793 100644 --- a/module/tty0tty.c +++ b/module/tty0tty.c @@ -214,7 +214,7 @@ static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer, int count) { struct tty0tty_serial *tty0tty = tty->driver_data; - int retval = -EINVAL; + int retval = 0; struct tty_struct *ttyx = NULL; if (!tty0tty) @@ -261,7 +261,7 @@ exit: static int tty0tty_write_room(struct tty_struct *tty) { struct tty0tty_serial *tty0tty = tty->driver_data; - int room = -EINVAL; + int room = 0; if (!tty0tty) return -ENODEV; -- libgit2 0.21.4