Commit 7c7540aa9e3a8d7440c7b6029cc82da703d4a826
Committed by
Artem Mygaiev
1 parent
5f8d18dd
Return 0 space instead of -EINVAL when there are no readers
Showing
1 changed file
with
2 additions
and
2 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 = 0; | |
| 218 | 218 | struct tty_struct *ttyx = NULL; |
| 219 | 219 | |
| 220 | 220 | if (!tty0tty) |
| ... | ... | @@ -261,7 +261,7 @@ exit: |
| 261 | 261 | static int tty0tty_write_room(struct tty_struct *tty) |
| 262 | 262 | { |
| 263 | 263 | struct tty0tty_serial *tty0tty = tty->driver_data; |
| 264 | - int room = -EINVAL; | |
| 264 | + int room = 0; | |
| 265 | 265 | |
| 266 | 266 | if (!tty0tty) |
| 267 | 267 | return -ENODEV; | ... | ... |