[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.20.1712051116130.21642@localhost>
Date: Tue, 5 Dec 2017 11:18:10 +1100 (AEDT)
From: James Morris <james.l.morris@...cle.com>
To: Colin King <colin.king@...onical.com>
cc: David Howells <dhowells@...hat.com>,
"Serge E . Hallyn" <serge@...lyn.com>, keyrings@...r.kernel.org,
linux-security-module@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] security: keys: remove redundant assignment to key_ref
On Mon, 4 Dec 2017, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Variable key_ref is being assigned a value that is never read;
> key_ref is being re-assigned a few statements later. Hence this
> assignment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
I think a general cleanup in that function to make all of these follow the
pattern:
if (something) {
key_ref = ERR_PTR(-error);
goto error;
}
rather than unconditionally setting the error first, would be better, but
this is a clear enough fix on its own.
Reviewed-by: James Morris <james.l.morris@...cle.com>
--
James Morris
<james.l.morris@...cle.com>
Powered by blists - more mailing lists