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