From: Tom Rini Date: Wed, 10 May 2017 19:20:18 +0000 (-0400) Subject: tpm: Fix comparison of unsigned expression warning X-Git-Tag: baikal/mips/sdk5.9~4898 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=3dec3a2b43b87e7a04d9894b1a4e1ed6b6b9b554;p=uboot.git tpm: Fix comparison of unsigned expression warning The function tpm_xfer returns int so make 'err' be int rather than uint32_t so that we can catch an error condition. Reported by clang-3.8. Signed-off-by: Tom Rini --- diff --git a/lib/tpm.c b/lib/tpm.c index cd7f88f220..fb520e3d73 100644 --- a/lib/tpm.c +++ b/lib/tpm.c @@ -230,10 +230,9 @@ static uint32_t tpm_sendrecv_command(const void *command, void *response, size_t *size_ptr) { struct udevice *dev; - int ret; + int err, ret; uint8_t response_buffer[COMMAND_BUFFER_SIZE]; size_t response_length; - uint32_t err; if (response) { response_length = *size_ptr;