PCI: altera: Fix platform_get_irq() error handling
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 31 Aug 2017 17:52:07 +0000 (14:52 -0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 5 Sep 2017 18:36:28 +0000 (13:36 -0500)
commitef75369a5b9afc8b45456218790f0f12906b7065
treeec3c0a57e7a119e8d46cb266814639d2d662b077
parentbfdbbf0e3c2a6e3fe752e0dc858c982aa1ccecad
PCI: altera: Fix platform_get_irq() error handling

platform_get_irq() returns a negative number on failure, so adjust the
logic to detect such condition and propagate the real error value on
failure.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Ley Foon Tan <lftan@altera.com>
drivers/pci/host/pcie-altera-msi.c
drivers/pci/host/pcie-altera.c