ata: libahci: properly propagate return value of platform_get_irq()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 16 May 2017 12:06:12 +0000 (14:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:50:06 +0000 (19:50 +0200)
commit49b5cd2667c11726f6da3a004cbd3a2dc330e076
treeaac9e0de2b1498f434c34c305258aed99e51f87d
parentef51fe4d409b8f944345875345d75702a6b31a65
ata: libahci: properly propagate return value of platform_get_irq()

[ Upstream commit c034640a32f8456018d9c8c83799ead683046b95 ]

When platform_get_irq() fails, it returns an error code, which
libahci_platform and replaces it by -EINVAL. This commit fixes that by
propagating the error code. It fixes the situation where
platform_get_irq() returns -EPROBE_DEFER because the interrupt
controller is not available yet, and generally looks like the right
thing to do.

We pay attention to not show the "no irq" message when we are in an
EPROBE_DEFER situation, because the driver probing will be retried
later on, once the interrupt controller becomes available to provide
the interrupt.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/libahci_platform.c