Message ID | 20230218152741.528191-3-ilias.apalodimas@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/4,v4] tpm: add a function that performs selftest + startup | expand |
On Sat, 18 Feb 2023 at 08:27, Ilias Apalodimas <ilias.apalodimas@linaro.org> wrote: > > 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. > > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> > --- > Changes since v3: > - New patch. Required for [4/4] > > drivers/tpm/tpm2_tis_sandbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c index dd94bdc31fb7..e4004cfcca33 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;
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. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> --- Changes since v3: - New patch. Required for [4/4] drivers/tpm/tpm2_tis_sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.39.2