All of lore.kernel.org
 help / color / mirror / Atom feed
* Error handling in drivers/pci/host/pcie-xilinx.c
@ 2016-07-13  4:33 Christophe JAILLET
  2016-07-13  4:58   ` Christophe JAILLET
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe JAILLET @ 2016-07-13  4:33 UTC (permalink / raw)
  To: kernel-janitors

Hi,

in file 'drivers/pci/host/pcie-xilinx.c', error handling in 
'xilinx_pcie_init_irq_domain()' seams to be broken.

The pattern used is:

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

so we always return '0', which means success.

Returning PTR_ERR(-EINVAL) or PTR_ERR(-ENODEV) could be, IMHO, better.

Best regards,

CJ



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Error handling in drivers/pci/host/pcie-xilinx.c
@ 2016-07-13  4:58   ` Christophe JAILLET
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2016-07-13  4:58 UTC (permalink / raw)
  To: linux-arm-kernel

(resent because of broken cc)


Hi,

in file 'drivers/pci/host/pcie-xilinx.c', error handling in 
'xilinx_pcie_init_irq_domain()' seams to be broken.

The pattern used is:

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

so we always return '0', which means success.

Returning PTR_ERR(-EINVAL) or PTR_ERR(-ENODEV) could be, IMHO, better.

Best regards,

CJ




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Error handling in drivers/pci/host/pcie-xilinx.c
@ 2016-07-13  4:58   ` Christophe JAILLET
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2016-07-13  4:58 UTC (permalink / raw)
  To: linux-pci, linux-arm-kernel

(resent because of broken cc)


Hi,

in file 'drivers/pci/host/pcie-xilinx.c', error handling in 
'xilinx_pcie_init_irq_domain()' seams to be broken.

The pattern used is:

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

so we always return '0', which means success.

Returning PTR_ERR(-EINVAL) or PTR_ERR(-ENODEV) could be, IMHO, better.

Best regards,

CJ



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Error handling in drivers/pci/host/pcie-xilinx.c
@ 2016-07-13  4:58   ` Christophe JAILLET
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2016-07-13  4:58 UTC (permalink / raw)
  To: linux-arm-kernel

(resent because of broken cc)


Hi,

in file 'drivers/pci/host/pcie-xilinx.c', error handling in 
'xilinx_pcie_init_irq_domain()' seams to be broken.

The pattern used is:

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

so we always return '0', which means success.

Returning PTR_ERR(-EINVAL) or PTR_ERR(-ENODEV) could be, IMHO, better.

Best regards,

CJ

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-13  4:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13  4:33 Error handling in drivers/pci/host/pcie-xilinx.c Christophe JAILLET
2016-07-13  4:58 ` Christophe JAILLET
2016-07-13  4:58   ` Christophe JAILLET
2016-07-13  4:58   ` Christophe JAILLET

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.