linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Colin Ian King" <colin.i.king@gmail.com>,
	"Peter Huewe" <peterhuewe@gmx.de>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	<linux-integrity@vger.kernel.org>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] tpm/eventlog: remove redundant assignment to variabel ret
Date: Sun, 14 Apr 2024 00:39:11 +0300	[thread overview]
Message-ID: <D0JBJJ3ZOR1E.29NIB5RSEJRSL@kernel.org> (raw)
In-Reply-To: <20240411084913.305780-1-colin.i.king@gmail.com>

On Thu Apr 11, 2024 at 11:49 AM EEST, Colin Ian King wrote:
> Variable ret is being assigned and error code that is never read, it is
> either being re-assigned in an error exit path or never referenced again
> on the non-error path. The assignment is redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/char/tpm/eventlog/acpi.c:145:2: warning: Value stored to 'ret'
> is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/char/tpm/eventlog/acpi.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/char/tpm/eventlog/acpi.c b/drivers/char/tpm/eventlog/acpi.c
> index bd757d836c5c..69533d0bfb51 100644
> --- a/drivers/char/tpm/eventlog/acpi.c
> +++ b/drivers/char/tpm/eventlog/acpi.c
> @@ -142,7 +142,6 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
>  
>  	log->bios_event_log_end = log->bios_event_log + len;
>  
> -	ret = -EIO;
>  	virt = acpi_os_map_iomem(start, len);
>  	if (!virt) {
>  		dev_warn(&chip->dev, "%s: Failed to map ACPI memory\n", __func__);


Thanks!

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

      reply	other threads:[~2024-04-13 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  8:49 [PATCH][next] tpm/eventlog: remove redundant assignment to variabel ret Colin Ian King
2024-04-13 21:39 ` Jarkko Sakkinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D0JBJJ3ZOR1E.29NIB5RSEJRSL@kernel.org \
    --to=jarkko@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).