aboutsummaryrefslogtreecommitdiff
path: root/drivers/tpm
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2023-02-18 17:18:49 +0200
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2023-02-28 09:44:25 +0200
commit87bc11d5e2d79e8269206cc7fc96af896a46f983 (patch)
tree641dd11630245737ee3e48c8bd61248951eb2f80 /drivers/tpm
parent78fd2f54d5e1411b164a4757f5d8b307a3811eb5 (diff)
downloadu-boot-87bc11d5e2d79e8269206cc7fc96af896a46f983.zip
u-boot-87bc11d5e2d79e8269206cc7fc96af896a46f983.tar.gz
u-boot-87bc11d5e2d79e8269206cc7fc96af896a46f983.tar.bz2
tpm: sandbox: Change the return code when device is already open
All the TPM drivers as well as out TCG TIS API for a TPM2.0 device return -EBUSY if the device has already been opened. Adjust the sandbox TPM do return the same error code. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'drivers/tpm')
-rw-r--r--drivers/tpm/tpm2_tis_sandbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index dd94bdc..e4004cf 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -810,7 +810,7 @@ static int sandbox_tpm2_open(struct udevice *dev)
struct sandbox_tpm2 *tpm = dev_get_priv(dev);
if (tpm->init_done)
- return -EIO;
+ return -EBUSY;
tpm->init_done = true;