tpm/ppi: fix return type in tpm_show_ppi_response()
This "status" is declared as type acpi_status but it is never used to
store any acpi_statuses, only int.
The tpm_show_ppi_response() function returns ssize_t (signed long) and
acpi_status is unsigned int. That means that negative error codes will
be type promoted to large positive values.
Fixes: 84b1667dea23 ("ACPI / TPM: replace open-coded _DSM code with helper functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
index 40018a7..240df92 100644
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -222,7 +222,7 @@
struct device_attribute *attr,
char *buf)
{
- acpi_status status = -EINVAL;
+ int status = -EINVAL;
union acpi_object *obj, *ret_obj;
u64 req, res;
struct tpm_chip *chip = to_tpm_chip(dev);