diff mbox

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

Message ID 1403125188-20185-1-git-send-email-jeroen@myspectrum.nl
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Jeroen Hofstee June 18, 2014, 8:59 p.m. UTC
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@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 drivers/tpm/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini July 8, 2014, 1:36 a.m. UTC | #1
On Wed, Jun 18, 2014 at 10:59:48PM +0200, Jeroen Hofstee wrote:

> 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@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Applied to u-boot/master, thanks!
diff mbox

Patch

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;