Skip to content

Commit

Permalink
ipmi_si: Avoid spurious errors for optional IRQs
Browse files Browse the repository at this point in the history
Although the IRQ assignment in ipmi_si driver is optional,
platform_get_irq() spews error messages unnecessarily:
  ipmi_si dmi-ipmi-si.0: IRQ index 0 not found

Fix this by switching to platform_get_irq_optional().

Cc: [email protected] # 5.4.x
Cc: John Donnelly <[email protected]>
Fixes: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()")
Reported-and-tested-by: Patrick Vo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
tiwai authored and cminyard committed Mar 12, 2020
1 parent ca7e1fd commit 443d372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_si_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int platform_ipmi_probe(struct platform_device *pdev)
else
io.slave_addr = slave_addr;

io.irq = platform_get_irq(pdev, 0);
io.irq = platform_get_irq_optional(pdev, 0);
if (io.irq > 0)
io.irq_setup = ipmi_std_irq_setup;
else
Expand Down Expand Up @@ -378,7 +378,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
io.irq = tmp;
io.irq_setup = acpi_gpe_irq_setup;
} else {
int irq = platform_get_irq(pdev, 0);
int irq = platform_get_irq_optional(pdev, 0);

if (irq > 0) {
io.irq = irq;
Expand Down

0 comments on commit 443d372

Please sign in to comment.