kernel-fxtec-pro1x/drivers/char/tpm
Vasily Averin 01729f8db1 tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
[ Upstream commit ccf6fb858e17a8f8a914a1c6444d277cfedfeae6 ]

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:01 +02:00
..
eventlog tpm: tpm2_bios_measurements_next should increase position index 2020-04-17 10:48:46 +02:00
st33zp24 tpm: Fix some name collisions with drivers/char/tpm.h 2019-09-16 08:22:05 +02:00
Kconfig tpm: Move Linux RNG connection to hwrng 2018-01-08 12:58:36 +02:00
Makefile tpm: Move shared eventlog functions to common.c 2018-05-09 14:45:46 +03:00
tpm-chip.c tpm: Don't make log failures fatal 2020-04-17 10:48:46 +02:00
tpm-dev-common.c tpm: fix race condition in tpm_common_write() 2018-05-30 20:11:31 +03:00
tpm-dev.c
tpm-dev.h tpm: fix race condition in tpm_common_write() 2018-05-30 20:11:31 +03:00
tpm-interface.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00
tpm-sysfs.c tpm: use tpm_try_get_ops() in tpm-sysfs.c. 2019-10-07 18:56:27 +02:00
tpm.h tpm: Don't make log failures fatal 2020-04-17 10:48:46 +02:00
tpm2-cmd.c tpm: add check after commands attribs tab allocation 2019-12-17 20:34:42 +01:00
tpm2-space.c tpm: replace TPM_TRANSMIT_RAW with TPM_TRANSMIT_NESTED 2018-07-28 17:03:11 +03:00
tpm_atmel.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00
tpm_atmel.h
tpm_crb.c tpm/tpm_crb: Avoid unaligned reads in crb_recv() 2019-03-23 20:10:11 +01:00
tpm_i2c_atmel.c tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete 2019-04-27 09:36:40 +02:00
tpm_i2c_infineon.c tpm: Fix some name collisions with drivers/char/tpm.h 2019-09-16 08:22:05 +02:00
tpm_i2c_nuvoton.c tpm: Fix some name collisions with drivers/char/tpm.h 2019-09-16 08:22:05 +02:00
tpm_ibmvtpm.c tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send() 2020-04-29 16:31:29 +02:00
tpm_ibmvtpm.h
tpm_infineon.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00
tpm_nsc.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00
tpm_ppi.c
tpm_tis.c tpm: remove unused variables 2018-01-08 12:58:54 +02:00
tpm_tis_core.c tpm_tis: extra chip->ops check on error path in tpm_tis_core_init 2020-07-22 09:32:01 +02:00
tpm_tis_core.h tpm: Allow tpm_tis drivers to set hwrng quality. 2018-07-28 17:03:11 +03:00
tpm_tis_spi.c tpm_tis_spi: Pass the SPI IRQ down to the driver 2018-07-28 17:03:11 +03:00
tpm_vtpm_proxy.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00
tpmrm-dev.c
xen-tpmfront.c tpm: Unify the send callback behaviour 2019-03-23 20:10:11 +01:00