Skip to content

Commit

Permalink
tpm: Switch to platform_get_irq_optional()
Browse files Browse the repository at this point in the history
platform_get_irq() calls 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.

Fixes: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()"
Cc: <[email protected]> # 5.4.x
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Jerry Snitselaar <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
jwrdegoede authored and Jarkko Sakkinen committed Nov 12, 2019
1 parent 3ef1938 commit 9c8c574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c8c574

Please sign in to comment.