[U-Boot] [PATCH] tpm: don't use unneeded double brackets

Jeroen Hofstee jeroen at myspectrum.nl
Wed Jun 18 22:59:48 CEST 2014


clang is tempted to inteprete such a condition as a assignment
as well. Since it isn't don't use double brackets.

cc: Tom Wai-Hong Tam <waihong at chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
---
 drivers/tpm/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tpm/tpm.c b/drivers/tpm/tpm.c
index b657334..bc0f964 100644
--- a/drivers/tpm/tpm.c
+++ b/drivers/tpm/tpm.c
@@ -411,7 +411,7 @@ static ssize_t tpm_transmit(const unsigned char *buf, size_t bufsiz)
 			goto out_recv;
 		}
 
-		if ((status == chip->vendor.req_canceled)) {
+		if (status == chip->vendor.req_canceled) {
 			error("Operation Canceled\n");
 			rc = -ECANCELED;
 			goto out;
-- 
1.8.3.2



More information about the U-Boot mailing list