summaryrefslogtreecommitdiff
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-04-11 11:49:13 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2024-05-09 22:30:50 +0300
commitd14d2cc265d01960cc5af468b4e718f5c4585d97 (patch)
treee71866d3a3fdbc7ce12aa0d5deaa3bfa0369d7a7 /drivers/char/tpm
parent6155153601183061cbc54516f4db843cb80f2e02 (diff)
downloadlinux-d14d2cc265d01960cc5af468b4e718f5c4585d97.tar.xz
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__);