summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2021-11-06 19:42:04 +0300
committerJoel Stanley <joel@jms.id.au>2022-01-14 06:48:50 +0300
commit09516cd33d812d6635ea01eb9359232ac35694bf (patch)
tree036ed3837cc692310e24066883b84e51cc7217e1 /drivers/char
parentf83801233166357e9df5bd5156db2739b5c8fd5e (diff)
downloadlinux-09516cd33d812d6635ea01eb9359232ac35694bf.tar.xz
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'
Commit 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent queries") has moved some code around without updating the error handling path. This is now pointless to 'goto out_err' when neither 'clk_enable()' nor 'ioremap()' have been called yet. Make a direct return instead to avoid undoing things that have not been done. OpenBMC-Staging-Count: 1 Fixes: 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent queries") Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index e2df1098a812..36d1ad8f479d 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -952,7 +952,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
if (rc < 0)
- goto out_err;
+ return rc;
priv->manufacturer_id = vendor;