Error handling in drivers/pci/host/pcie-xilinx.c

From: Christophe JAILLET <hidden>
Date: 2016-07-13 04:58:22
Also in: kernel-janitors, linux-pci

(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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help