Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932822Ab3EOO6s (ORCPT ); Wed, 15 May 2013 10:58:48 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:40594 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758866Ab3EOO6p (ORCPT ); Wed, 15 May 2013 10:58:45 -0400 MIME-Version: 1.0 In-Reply-To: <51939FB1.20203@gmail.com> References: <1368461313-4371-1-git-send-email-jiang.liu@huawei.com> <1368461313-4371-4-git-send-email-jiang.liu@huawei.com> <5191F53E.4000305@cn.fujitsu.com> <51925136.5050302@gmail.com> <51926CF6.1050706@gmail.com> <51939E16.9090105@gmail.com> <51939FB1.20203@gmail.com> Date: Wed, 15 May 2013 07:58:44 -0700 X-Google-Sender-Auth: 1e6S0ya4os951sHRvmUR19XiNWA Message-ID: Subject: Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead From: Yinghai Lu To: Liu Jiang , Benjamin Herrenschmidt , "Rafael J . Wysocki" , linuxppc-dev@lists.ozlabs.org, "sparclinux@vger.kernel.org" , "David S. Miller" Cc: Gu Zheng , Bjorn Helgaas , Greg Kroah-Hartman , Myron Stowe , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , Paul Mackerras Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1072 Lines: 44 On Wed, May 15, 2013 at 7:46 AM, Liu Jiang wrote: > On Wed 15 May 2013 10:43:02 PM CST, Yinghai Lu wrote: >> > >> that is another bug, let of guy handle it. >> >> Yinghai > > Hi Yinghai, > I don't know any OF exports, could you please help to CC > some OF experts? powerpc and sparc are using that. Ben, in drivers/pci/probe.c::pci_scan_device() there is pci_set_of_node(dev); if (pci_setup_device(dev)) { kfree(dev); return NULL; } so if pci_setup_device fails, there is one dev reference is not release. please check you can just move down pci_set_of_node down after that failing path, like if (pci_setup_device(dev)) { kfree(dev); return NULL; } pci_set_of_node(dev); Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/