Skip to content

Commit

Permalink
Allow tty0tty_write_room() to return ENOBUFS
Browse files Browse the repository at this point in the history
The very generic error code EINVAL, in function tty0tty_write,
replaced with more informative "No buffer space available"
return code ENOBUFS.

Signed-off-by: Geert Stappers <[email protected]>
  • Loading branch information
stappersg committed Jan 1, 2021
1 parent 5f8d18d commit e3de62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/tty0tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
static int tty0tty_write_room(struct tty_struct *tty)
{
struct tty0tty_serial *tty0tty = tty->driver_data;
int room = -EINVAL;
int room = -ENOBUFS;

if (!tty0tty)
return -ENODEV;
Expand Down

0 comments on commit e3de62f

Please sign in to comment.