]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: xilinx: Fix return value in case of error
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Jul 2016 10:10:46 +0000 (12:10 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 25 Jul 2016 17:28:12 +0000 (12:28 -0500)
commit10889920265e403c8e83e495ef4e1b4f295fedff
tree157176eaf66a217f27e8b5da96bcdca9bb4ceaf4
parent0491ad2600d2055b3241c61eb7ebbce5f94258a0
PCI: xilinx: Fix return value in case of error

In xilinx_pcie_init_irq_domain(), the pattern used to check and return
error is:

   if (!var) {
      dev_err(...);
      return PTR_ERR(var);
   }

So the returned value in case of error is always 0, which means 'success'.
Change it to return -ENODEV instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
drivers/pci/host/pcie-xilinx.c