tpm: Return tpm2_sessions_init() when null key creation fails
authorJarkko Sakkinen <jarkko@kernel.org>
Mon, 28 Oct 2024 05:49:59 +0000 (07:49 +0200)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 28 Oct 2024 15:22:01 +0000 (17:22 +0200)
commitd658d59471ed80c4a8aaf082ccc3e83cdf5ae4c1
treeafe1b1372e5151d5030cbd4289908d2b12ac79c9
parent81983758430957d9a5cb3333fe324fd70cf63e7e
tpm: Return tpm2_sessions_init() when null key creation fails

Do not continue tpm2_sessions_init() further if the null key pair creation
fails.

Cc: stable@vger.kernel.org # v6.10+
Fixes: d2add27cf2b8 ("tpm: Add NULL primary creation")
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm2-sessions.c