diff options
author | Lee Leahy <leroy.p.leahy@intel.com> | 2017-03-15 09:22:11 -0700 |
---|---|---|
committer | Lee Leahy <leroy.p.leahy@intel.com> | 2017-03-15 20:56:03 +0100 |
commit | 52ab30b13b867c1f3cd5aa5d9eb3e24d430c49d5 (patch) | |
tree | 85a5356335e918b55a8e8a0de1ed4f9ac761dfbb /src/drivers/i2c/tpm/tis.c | |
parent | 08824ec8d4d68ffa9edf1212e7f7e281da4d779f (diff) |
drivers/i2c/tpm: Fix issues detected by checkpatch
Fix the following warnings detected by checkpatch.pl:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: braces {} are not necessary for single statement blocks
WARNING: Unnecessary parentheses - maybe == should be = ?
WARNING: line over 80 characters
WARNING: missing space after return type
TEST=Build and run on Galileo Gen2
Change-Id: I56f915f6c1975cce123fd38043bad2638717d88c
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18832
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/drivers/i2c/tpm/tis.c')
-rw-r--r-- | src/drivers/i2c/tpm/tis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c index fea5145ad2..a0d05409ef 100644 --- a/src/drivers/i2c/tpm/tis.c +++ b/src/drivers/i2c/tpm/tis.c @@ -47,9 +47,8 @@ int tis_open(void) if (rc < 0) chip->is_open = 0; - if (rc) { + if (rc) return -1; - } return 0; } @@ -115,8 +114,9 @@ static ssize_t tpm_transmit(const uint8_t *buf, size_t bufsiz) goto out_recv; } - if ((status == chip->vendor.req_canceled)) { - printk(BIOS_DEBUG, "tpm_transmit: Operation Canceled\n"); + if (status == chip->vendor.req_canceled) { + printk(BIOS_DEBUG, + "tpm_transmit: Operation Canceled\n"); rc = -1; goto out; } |