diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-04-06 12:21:44 -0400 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2018-05-09 07:45:46 -0400 |
commit | f20b4f2245367e7471d844fb8685fd46f15c17db (patch) | |
tree | b530e62a3bfb0221358613dc5dee27c292936127 | |
parent | 92980756979a9c51be0275f395f4e89c42cf199a (diff) |
tpm: st33zp24: remove redundant null check on chip
Currently chip is being dereferenced by the call to dev_get_drvdata
before it is being null checked, however, chip can never be null, so
this check is misleading and redundant. Remove it.
Detected by CoverityScan, CID#1357806 ("Dereference before null check")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jarkko Sakkinen <jarkkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkkko.sakkinen@linux.intel.com>
-rw-r--r-- | drivers/char/tpm/st33zp24/st33zp24.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c index f95b9c75175b..abd675bec88c 100644 --- a/drivers/char/tpm/st33zp24/st33zp24.c +++ b/drivers/char/tpm/st33zp24/st33zp24.c | |||
@@ -373,8 +373,6 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf, | |||
373 | int ret; | 373 | int ret; |
374 | u8 data; | 374 | u8 data; |
375 | 375 | ||
376 | if (!chip) | ||
377 | return -EBUSY; | ||
378 | if (len < TPM_HEADER_SIZE) | 376 | if (len < TPM_HEADER_SIZE) |
379 | return -EBUSY; | 377 | return -EBUSY; |
380 | 378 | ||