From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Date: Tue, 05 Dec 2017 00:18:10 +0000 Subject: Re: [PATCH] security: keys: remove redundant assignment to key_ref Message-Id: List-Id: References: <20171204181424.15808-1-colin.king@canonical.com> In-Reply-To: <20171204181424.15808-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-security-module@vger.kernel.org On Mon, 4 Dec 2017, Colin King wrote: > From: Colin Ian King > > 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 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 Morris