Commit c17271a8eceedd10fdb743990e2551eaac57e9ad

Authored by Jeff Buchbinder
Committed by GitHub
2 parents c0e85cfb 78661fa8

Merge pull request #28 from klogg/no_error

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 = -ENOTCONN;
  217 + int retval = 0;
218 218 struct tty_struct *ttyx = NULL;
219 219  
220 220 if (!tty0tty)
... ... @@ -265,7 +265,7 @@ static int tty0tty_write_room(struct tty_struct *tty)
265 265 #endif
266 266 {
267 267 struct tty0tty_serial *tty0tty = tty->driver_data;
268   - int room = -ENOBUFS;
  268 + int room = 0;
269 269  
270 270 if (!tty0tty)
271 271 return -ENODEV;
... ...