On Sat, Jun 13, 2020 at 05:18:33PM +0300, Vasily Averin wrote: > 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@xxxxxxxxxxxxx> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx> /Jarkko