PCI: dra7xx: Fix return value in case of error
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Jul 2016 21:18:27 +0000 (23:18 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 25 Jul 2016 17:29:51 +0000 (12:29 -0500)
commit991bfef82f17194fe2a2f161b9552d9633ff21b9
tree7d6562026d75394d5cb980285ed6b8ec37d0d61b
parentaf8c34ce6ae32addda3788d54a7e340cad22516b
PCI: dra7xx: Fix return value in case of error

In dra7xx_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>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/host/pci-dra7xx.c