summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-04-11 10:49:13 +0200
committerJarkko Sakkinen <jarkko@kernel.org>2024-05-09 21:30:50 +0200
commitd14d2cc265d01960cc5af468b4e718f5c4585d97 (patch)
treee71866d3a3fdbc7ce12aa0d5deaa3bfa0369d7a7 /drivers/char/tpm
parentchar: tpm: handle HAS_IOPORT dependencies (diff)
downloadlinux-d14d2cc265d01960cc5af468b4e718f5c4585d97.tar.xz
linux-d14d2cc265d01960cc5af468b4e718f5c4585d97.zip
tpm/eventlog: remove redundant assignment to variabel ret
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> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/eventlog/acpi.c1
1 files changed, 0 insertions, 1 deletions
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__);