Unverified Commit a01bd327 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6265 tpm_tis: Avoid warning splat at shutdown

Merge Pull Request from: @lujunhuaHW 
 
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.

issue:https://gitee.com/openeuler/kernel/issues/I9G5IU 
 
Link:https://gitee.com/openeuler/kernel/pulls/6265

 

Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents 311726a6 8e77aed4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -919,8 +919,6 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
	int rc;
	u32 int_status;

	INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);

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

	dev_set_drvdata(&chip->dev, priv);