Re: [PATCH 44/44] tty: make everyone's write_room return >= 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 02, 2021 at 07:22:14AM +0100, Jiri Slaby wrote:
> The tty line disciplines don't expect tty_operations::write_room to
> return negative values. Fix the five drivers which violate this.
> 
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> ---
>  drivers/staging/gdm724x/gdm_tty.c | 2 +-
>  drivers/tty/ipwireless/tty.c      | 4 ++--
>  drivers/tty/n_gsm.c               | 2 +-
>  drivers/tty/vcc.c                 | 2 +-
>  drivers/usb/serial/mos7720.c      | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)

> diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
> index 701dfb32b129..bb3d39307d93 100644
> --- a/drivers/usb/serial/mos7720.c
> +++ b/drivers/usb/serial/mos7720.c
> @@ -1042,7 +1042,7 @@ static int mos7720_write_room(struct tty_struct *tty)
>  
>  	mos7720_port = usb_get_serial_port_data(port);
>  	if (mos7720_port == NULL)
> -		return -ENODEV;
> +		return 0;

This test is bogus and could just be removed, but that's for another
patch.

>  
>  	/* FIXME: Locking */
>  	for (i = 0; i < NUM_URBS; ++i) {

Johan



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux