lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 08 Nov 2011 09:27:54 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Dave Young <dyoung@...hat.com>
CC:	gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty_ldisc: remove unnecessary negative return check for
 wait_event_timeout

On 11/08/2011 06:44 AM, Dave Young wrote:
> wait_event_timeout always return value >= 0
> remove the unnecessary ret < 0 check
> 
> Signed-off-by: Dave Young <dyoung@...hat.com>

Acked-by: Jiri Slaby <jslaby@...e.cz>

This is a hangover from times when there was _interruptible.

> ---
>  drivers/tty/tty_ldisc.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> --- linux-2.6.orig/drivers/tty/tty_ldisc.c	2011-11-01 13:06:20.000000000 +0800
> +++ linux-2.6/drivers/tty/tty_ldisc.c	2011-11-08 13:31:30.596308060 +0800
> @@ -556,8 +556,6 @@ static int tty_ldisc_wait_idle(struct tt
>  	int ret;
>  	ret = wait_event_timeout(tty_ldisc_idle,
>  			atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
> -	if (ret < 0)
> -		return ret;
>  	return ret > 0 ? 0 : -EBUSY;
>  }
>  
-- 
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ