1
0
Fork 0

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>
hifive-unleashed-5.1
Colin Ian King 2018-04-06 17:21:44 +01:00 committed by Jarkko Sakkinen
parent 9298075697
commit f20b4f2245
1 changed files with 0 additions and 2 deletions

View File

@ -373,8 +373,6 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf,
int ret;
u8 data;
if (!chip)
return -EBUSY;
if (len < TPM_HEADER_SIZE)
return -EBUSY;