Re: [PATCH v4] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

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

 




Hi Jeffy,

[auto build test ERROR on pci/next]
[also build test ERROR on v4.11-rc5 next-20170405]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jeffy-Chen/of-pci-Fix-memory-leak-in-of_pci_get_host_bridge_resources/20170406-005941
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-lkp (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//pci/bus.c: In function 'pci_add_resource_offset':
>> drivers//pci/bus.c:36:2: error: expected ';' before 'entry'
     entry->offset = offset;
     ^~~~~

vim +36 drivers//pci/bus.c

0efd5aab Bjorn Helgaas 2012-02-23  20  void pci_add_resource_offset(struct list_head *resources, struct resource *res,
0efd5aab Bjorn Helgaas 2012-02-23  21  			     resource_size_t offset)
45ca9e97 Bjorn Helgaas 2011-10-28  22  {
14d76b68 Jiang Liu     2015-02-05  23  	struct resource_entry *entry;
45ca9e97 Bjorn Helgaas 2011-10-28  24  
fa904d0d Jeffy Chen    2017-04-05  25  	entry = resource_list_create_entry(NULL, 0);
14d76b68 Jiang Liu     2015-02-05  26  	if (!entry) {
0efd5aab Bjorn Helgaas 2012-02-23  27  		printk(KERN_ERR "PCI: can't add host bridge window %pR\n", res);
45ca9e97 Bjorn Helgaas 2011-10-28  28  		return;
45ca9e97 Bjorn Helgaas 2011-10-28  29  	}
45ca9e97 Bjorn Helgaas 2011-10-28  30  
fa904d0d Jeffy Chen    2017-04-05  31  	if (res->flags & IORESOURCE_AUTO)
fa904d0d Jeffy Chen    2017-04-05  32  		*entry->res = *res;
fa904d0d Jeffy Chen    2017-04-05  33  	else
fa904d0d Jeffy Chen    2017-04-05  34  		entry->res = res
fa904d0d Jeffy Chen    2017-04-05  35  
14d76b68 Jiang Liu     2015-02-05 @36  	entry->offset = offset;
14d76b68 Jiang Liu     2015-02-05  37  	resource_list_add_tail(entry, resources);
0efd5aab Bjorn Helgaas 2012-02-23  38  }
0efd5aab Bjorn Helgaas 2012-02-23  39  EXPORT_SYMBOL(pci_add_resource_offset);
0efd5aab Bjorn Helgaas 2012-02-23  40  
0efd5aab Bjorn Helgaas 2012-02-23  41  void pci_add_resource(struct list_head *resources, struct resource *res)
0efd5aab Bjorn Helgaas 2012-02-23  42  {
0efd5aab Bjorn Helgaas 2012-02-23  43  	pci_add_resource_offset(resources, res, 0);
45ca9e97 Bjorn Helgaas 2011-10-28  44  }

:::::: The code at line 36 was first introduced by commit
:::::: 14d76b68f2819a1d0b50236a7e9e9f2ea69869d9 PCI: Use common resource list management code instead of private implementation

:::::: TO: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux