]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sat, 6 Nov 2021 16:42:04 +0000 (17:42 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:55 +0000 (10:59 +0100)
commit0d20ca658c2b4c01da53c842973f7d2365ef1e08
treeebf40ee7c75e2f7fd775f772f2430ee5fa7d6c1b
parentd295b01831075138816e553ce3e0169bd1ecabff
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'

BugLink: https://bugs.launchpad.net/bugs/1959376
[ 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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/char/tpm/tpm_tis_core.c