[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f6c2e1e-770b-aade-cdcc-aa4010c36d5e@kernel.org>
Date: Fri, 14 May 2021 08:51:30 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Colin King <colin.king@...onical.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: pty: remove redundant initialization of variable fd
On 14. 05. 21, 0:18, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The variable fd is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Reviewed-by: Jiri Slaby <jirislaby@...nel.org>
> ---
> drivers/tty/pty.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
> index 9b5d4ae5d8f2..2251330e7e00 100644
> --- a/drivers/tty/pty.c
> +++ b/drivers/tty/pty.c
> @@ -626,7 +626,7 @@ static struct cdev ptmx_cdev;
> */
> int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
> {
> - int fd = -1;
> + int fd;
> struct file *filp;
> int retval = -EINVAL;
> struct path path;
>
--
js
suse labs
Powered by blists - more mailing lists