Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm_tis: Fix incorrect arguments in tpm_tis_probe_irq_single

The tpm_tis_write8() call specifies arguments in wrong order. Should be
(data, addr, value) not (data, value, addr). The initial correct order
was changed during the major refactoring when the code was split.

Fixes: 41a5e1cf1fe1 ("tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy")
Signed-off-by: Gunnar Kudrjavets <gunnarku@amazon.com>
Reviewed-by: Justinien Bouron <jbouron@amazon.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>

authored by

Gunnar Kudrjavets and committed by
Jarkko Sakkinen
8a81236f 64a7cfbc

+2 -2
+2 -2
drivers/char/tpm/tpm_tis_core.c
··· 978 978 * will call disable_irq which undoes all of the above. 979 979 */ 980 980 if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { 981 - tpm_tis_write8(priv, original_int_vec, 982 - TPM_INT_VECTOR(priv->locality)); 981 + tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality), 982 + original_int_vec); 983 983 rc = -1; 984 984 } 985 985