Re: [PATCH] dpc.c: fix missing return value check of pci_find_ext_capability()

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

 



On Fri, Aug 17, 2018 at 04:17:19PM +0800, Jiecheng Wu wrote:
> Function dpc_probe() defined in drivers/pci/pcie/dpc.c calls
> pci_find_ext_capability(). Function pci_find_ext_capability() returns
> the address of the requested extended capability structure within the
> device's PCI configuration space or 0 if the device does not support
> it. The return value of this function should be checked against 0.

dpc_probe will not get called if the capability doesn't exist. The
capability existing is the criteria for PCIE_PORT_SERVICE_DPC flag,
which is required to call dpc_probe.



[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