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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(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


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux