linux/drivers/char/tpm
Vasily Averin 827139ad9d tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
[ Upstream commit ccf6fb858e ]

Found by smatch:
drivers/char/tpm/tpm_tis_core.c:1088 tpm_tis_core_init() warn:
 variable dereferenced before check 'chip->ops' (see line 979)

'chip->ops' is assigned in the beginning of function
in tpmm_chip_alloc->tpm_chip_alloc
and is used before first possible goto to error path.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:53 +02:00
..
eventlog tpm: tpm2_bios_measurements_next should increase position index 2020-04-17 10:50:11 +02:00
st33zp24
Kconfig
Makefile
tpm-chip.c tpm: Don't make log failures fatal 2020-04-17 10:50:11 +02:00
tpm-dev-common.c tpm: Fix TIS locality timeout problems 2020-07-09 09:37:51 +02:00
tpm-dev.c
tpm-dev.h
tpm-interface.c tpm: fix wrong return value in tpm_pcr_extend 2020-04-29 16:33:16 +02:00
tpm-sysfs.c
tpm.h tpm: Don't make log failures fatal 2020-04-17 10:50:11 +02:00
tpm1-cmd.c
tpm2-cmd.c tpm: Initialize crypto_id of allocated_banks to HASH_ALGO__LAST 2020-02-28 17:22:13 +01:00
tpm2-space.c
tpm_atmel.c
tpm_atmel.h
tpm_crb.c
tpm_ftpm_tee.c
tpm_ftpm_tee.h
tpm_i2c_atmel.c
tpm_i2c_infineon.c
tpm_i2c_nuvoton.c
tpm_ibmvtpm.c tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send() 2020-04-29 16:33:16 +02:00
tpm_ibmvtpm.h
tpm_infineon.c
tpm_nsc.c
tpm_ppi.c
tpm_tis.c
tpm_tis_core.c tpm_tis: extra chip->ops check on error path in tpm_tis_core_init 2020-07-22 09:32:53 +02:00
tpm_tis_core.h
tpm_tis_spi.c
tpm_vtpm_proxy.c
tpmrm-dev.c
xen-tpmfront.c