]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Fri, 9 Apr 2021 05:58:31 +0000 (08:58 +0300)
commit289b91ab1891ce9188e7dc253367e6326e3f74c1
tree6b82374d2a36f87e0e2cbe1b571fa4bd4082bde0
parent2ee55787f818da75cfb591d998ece52420814bb5
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