]> git.ipfire.org Git - thirdparty/u-boot.git/commit
tpm: tis_infineon: Cannot test unsigned for being negative
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 13 Aug 2025 10:40:05 +0000 (11:40 +0100)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Mon, 25 Aug 2025 10:04:21 +0000 (13:04 +0300)
commit73b23838c44b152deef68b7c22d923f0ca7a563f
tree54ac31f8312ec0ce8bce925a059bf9012e447e0e
parent83b1c7fd7119ae654aba70b2451b519035b5403d
tpm: tis_infineon: Cannot test unsigned for being negative

tpm_tis_i2c_get_burstcount returns a size_t but also returns -EBUSY if
the TPM is surrently busy. As size_t is an unsigned type simply testing
for < 0 will not work so change the test for being equal to -EBUSY which
will work. Also remove the trivial comments.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/tpm/tpm_tis_infineon.c