On 2/28/2018 12:04 PM, Oza Pawandeep wrote:good point, will take care of this. [along with other comments if any]
+struct pcie_port_service_driver *pcie_port_find_service(struct pci_dev *dev,
+ u32 service)
+{
+ struct pcie_port_service_driver *drv = NULL;
Remove initialization
+ struct portdrv_service_data pdrvs;
+
+ pdrvs.service = service;
initialize pdrvs.drv = NULL here.
+ device_for_each_child(&dev->dev, &pdrvs, find_service_iter);
+
+ drv = pdrvs.drv;
+ return drv;
+}