summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/char/tpm/tpm_crb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index fe42c4a0d8d1..a4ac63a21d8a 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -514,11 +514,12 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,
goto out;
}
- priv->cmd_size = cmd_size;
-
priv->rsp = priv->cmd;
out:
+ if (!ret)
+ priv->cmd_size = cmd_size;
+
crb_go_idle(dev, priv);
return ret;