Skip to content

Commit b7ab4bb

Browse files
linosanfilippo-kunbusjarkkojs
authored andcommitted
tpm,tpm_tis: Avoid warning splat at shutdown
If interrupts are not activated the work struct 'free_irq_work' is not initialized. This results in a warning splat at module shutdown. Fix this by always initializing the work regardless of whether interrupts are activated or not. cc: stable@vger.kernel.org Fixes: 481c2d1 ("tpm,tpm_tis: Disable interrupts after 1000 unhandled IRQs") Reported-by: Jarkko Sakkinen <jarkko@kernel.org> Closes: https://lore.kernel.org/all/CX32RFOMJUQ0.3R4YCL9MDCB96@kernel.org/ Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 parent d5166a4 commit b7ab4bb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/char/tpm/tpm_tis_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,6 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
919919
int rc;
920920
u32 int_status;
921921

922-
INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
923-
924922
rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL,
925923
tis_int_handler, IRQF_ONESHOT | flags,
926924
dev_name(&chip->dev), chip);
@@ -1132,6 +1130,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
11321130
priv->phy_ops = phy_ops;
11331131
priv->locality_count = 0;
11341132
mutex_init(&priv->locality_count_mutex);
1133+
INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
11351134

11361135
dev_set_drvdata(&chip->dev, priv);
11371136

0 commit comments

Comments
 (0)