ipmi_si: Avoid spurious errors for optional IRQs

commit 443d372d6a96cd94ad119e5c14bb4d63a536a7f6 upstream.

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: stable@vger.kernel.org # 5.4.x
Cc: John Donnelly <john.p.donnelly@oracle.com>
Fixes: 7723f4c5ec ("driver core: platform: Add an error message to platform_get_irq*()")
Reported-and-tested-by: Patrick Vo <patrick.vo@hpe.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-Id: <20200205093146.1352-1-tiwai@suse.de>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Takashi Iwai 2020-02-05 10:31:46 +01:00 committed by Greg Kroah-Hartman
parent fbbacd0dcb
commit 0c47d02ad4

View File

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