summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm-dev-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tpm/tpm-dev-common.c')
-rw-r--r--drivers/char/tpm/tpm-dev-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c
index b23b0b999232..87f449340202 100644
--- a/drivers/char/tpm/tpm-dev-common.c
+++ b/drivers/char/tpm/tpm-dev-common.c
@@ -130,7 +130,7 @@ ssize_t tpm_common_read(struct file *file, char __user *buf,
priv->response_read = true;
ret_size = min_t(ssize_t, size, priv->response_length);
- if (!ret_size) {
+ if (ret_size <= 0) {
priv->response_length = 0;
goto out;
}