diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2021-11-06 19:42:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 13:04:01 +0300 |
commit | deb81894f56e8063d471465f42e09afbb5779baf (patch) | |
tree | 427921bdf410f2734dbc16c48ab696f458b639d2 /drivers/char | |
parent | ea1fd8364c9fbe0dfad677fd23d0ff240c3c7a7f (diff) | |
download | linux-deb81894f56e8063d471465f42e09afbb5779baf.tar.xz |
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'
[ Upstream commit e96d52822f5ac0a25de78f95cd23421bcbc93584 ]
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.
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: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm_tis_core.c | 2 |
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; |