Commit d7f9e068bab08c8dbb7ddbc4129fd26188555fd7

Authored by Geert Stappers
1 parent 5f8d18dd

Less generic error code for write()

Replaced the very generic EINVAL error code with ENOTCONN.
Because it is easy to trigger the error state of endpoint not connected.

Signed-off-by: Geert Stappers <stappers@stappers.it>
Showing 1 changed file with 1 additions and 1 deletions
module/tty0tty.c
... ... @@ -214,7 +214,7 @@ static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
214 214 int count)
215 215 {
216 216 struct tty0tty_serial *tty0tty = tty->driver_data;
217   - int retval = -EINVAL;
  217 + int retval = -ENOTCONN;
218 218 struct tty_struct *ttyx = NULL;
219 219  
220 220 if (!tty0tty)
... ...