提交 f20b4f22 编写于 作者: C Colin Ian King 提交者: Jarkko Sakkinen

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: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NJarkko Sakkinen <jarkkko.sakkinen@linux.intel.com>
Signed-off-by: NJarkko Sakkinen <jarkkko.sakkinen@linux.intel.com>
上级 92980756
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册