linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm: Switch to platform_get_irq_optional()
@ 2019-10-19  9:45 Hans de Goede
  2019-10-21 14:05 ` Jason Gunthorpe
  2019-10-21 15:49 ` Jarkko Sakkinen
  0 siblings, 2 replies; 14+ messages in thread
From: Hans de Goede @ 2019-10-19  9:45 UTC (permalink / raw)
  To: Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe
  Cc: Hans de Goede, Arnd Bergmann, Greg Kroah-Hartman,
	linux-integrity, stable

Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()"), platform_get_irq() will call dev_err() on an error,
as the IRQ usage in the tpm_tis driver is optional, this is undesirable.

Specifically this leads to this new false-positive error being logged:
[    5.135413] tpm_tis MSFT0101:00: IRQ index 0 not found

This commit switches to platform_get_irq_optional(), which does not log
an error, fixing this.

Cc: <stable@vger.kernel.org> # 5.4.x
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/char/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index e4fdde93ed4c..e7df342a317d 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -286,7 +286,7 @@ static int tpm_tis_plat_probe(struct platform_device *pdev)
 	}
 	tpm_info.res = *res;
 
-	tpm_info.irq = platform_get_irq(pdev, 0);
+	tpm_info.irq = platform_get_irq_optional(pdev, 0);
 	if (tpm_info.irq <= 0) {
 		if (pdev != force_pdev)
 			tpm_info.irq = -1;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-10-28 20:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19  9:45 [PATCH] tpm: Switch to platform_get_irq_optional() Hans de Goede
2019-10-21 14:05 ` Jason Gunthorpe
2019-10-23 11:32   ` Jarkko Sakkinen
2019-10-24 15:36     ` Jason Gunthorpe
2019-10-21 15:49 ` Jarkko Sakkinen
2019-10-21 15:56   ` Hans de Goede
2019-10-23 11:37     ` Jarkko Sakkinen
2019-10-23 14:32       ` Hans de Goede
2019-10-24 14:25         ` Jarkko Sakkinen
2019-10-24 14:27           ` Hans de Goede
2019-10-24 19:09             ` Jarkko Sakkinen
2019-10-24 19:11               ` Jason Gunthorpe
2019-10-25  9:13               ` Hans de Goede
2019-10-28 20:47                 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).