diff options
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r-- | hw/tpm/tpm_passthrough.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index e98efb709e..e88c0d20bc 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -86,7 +86,7 @@ static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len) int ret, remain; remain = len; - while (len > 0) { + while (remain > 0) { ret = write(fd, buf, remain); if (ret < 0) { if (errno != EINTR && errno != EAGAIN) { |