char: tpm: fix error return code in tpm_cr50_i2c_tis_recv()
authorZhihao Cheng <chengzhihao1@huawei.com>
Fri, 9 Apr 2021 01:12:01 +0000 (09:12 +0800)
committerJarkko Sakkinen <jarkko@kernel.org>
Wed, 14 Apr 2021 13:30:30 +0000 (16:30 +0300)
commit3d785d73b4c1014839d9f9af0ee526f8d5706a73
treedbef008143b3b83b09e9ca4cc66bdb713868030a
parent9d53913fad3ee800d0067c39881a86a5eb739ae3
char: tpm: fix error return code in tpm_cr50_i2c_tis_recv()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 3a253caaad11 ("char: tpm: add i2c driver for cr50")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_tis_i2c_cr50.c