Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tpm_i2c_nuvoton: fix tpm_read_fifo overflow check
The tpm_read_fifo expects buflen parameter which is the size of buf parameter. Later it uses buflen to check for an overflow in the case tpm response is bigger than buf capacity. The check is fine, but it doesn't interrupt the code flow, so even though we see error messages about the overflow, it doesn't prevent it. Adding a goto after specifying the error return code fixes it. Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com> Reviewed-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com> Reviewed-by: Claudio Carvalho <cclaudio@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
- Loading branch information