Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 0ea00e2

Browse files
jbeulichjarkkojs
authored andcommitted
tpm_tis: Do *not* flush uninitialized work
tpm_tis_core_init() may fail before tpm_tis_probe_irq_single() is called, in which case tpm_tis_remove() unconditionally calling flush_work() is triggering a warning for .func still being NULL. Cc: stable@vger.kernel.org # v6.5+ Fixes: 481c2d1 ("tpm,tpm_tis: Disable interrupts after 1000 unhandled IRQs") Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 parent 32f88d6 commit 0ea00e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/char/tpm/tpm_tis_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,8 @@ void tpm_tis_remove(struct tpm_chip *chip)
10201020
interrupt = 0;
10211021

10221022
tpm_tis_write32(priv, reg, ~TPM_GLOBAL_INT_ENABLE & interrupt);
1023-
flush_work(&priv->free_irq_work);
1023+
if (priv->free_irq_work.func)
1024+
flush_work(&priv->free_irq_work);
10241025

10251026
tpm_tis_clkrun_enable(chip, false);
10261027

0 commit comments

Comments
 (0)