Re: [PATCH] PCI: xilinx: Fix return value in case of error

2016-07-25 Thread Bjorn Helgaas
On Thu, Jul 14, 2016 at 12:10:46PM +0200, Christophe JAILLET wrote: > In function '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, wh

Re: [PATCH] PCI: xilinx: Fix return value in case of error

2016-07-14 Thread Sören Brinkmann
On Thu, 2016-07-14 at 12:10:46 +0200, Christophe JAILLET wrote: > In function '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

[PATCH] PCI: xilinx: Fix return value in case of error

2016-07-14 Thread Christophe JAILLET
In function '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 J