Message ID | 1403125188-20185-1-git-send-email-jeroen@myspectrum.nl |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
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 --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;
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(-)