vfio: platform: Switch to platform_get_irq_optional()
authorEric Auger <eric.auger@redhat.com>
Tue, 24 Mar 2020 15:26:30 +0000 (09:26 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 24 Mar 2020 15:26:30 +0000 (09:26 -0600)
commit723fe298ad85ad1278bd2312469ad14738953cc6
treeb4750c3eee35e81973a39f02c01c658032c7ecd9
parent16fbf79b0f83bc752cee8589279f1ebfe57b3b6e
vfio: platform: Switch to platform_get_irq_optional()

Since commit 7723f4c5ecdb ("driver core: platform: Add an error
message to platform_get_irq*()"), platform_get_irq() calls dev_err()
on an error. As we enumerate all interrupts until platform_get_irq()
fails, we now systematically get a message such as:
"vfio-platform fff51000.ethernet: IRQ index 3 not found" which is
a false positive.

Let's use platform_get_irq_optional() instead.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Cc: stable@vger.kernel.org # v5.3+
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform.c