tpm: Store the length of the tpm_buf data separately.
[linux-2.6-block.git] / drivers / char / tpm / tpm-interface.c
index f940045a014e8b2a5572c3ac4761a4976642c27f..5da134f12c9a470fb83f85574b46b6105466111a 100644 (file)
@@ -232,6 +232,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_buf *buf,
        if (len < min_rsp_body_length + TPM_HEADER_SIZE)
                return -EFAULT;
 
+       buf->length = len;
        return 0;
 }
 EXPORT_SYMBOL_GPL(tpm_transmit_cmd);