From patchwork Wed Jan 20 13:15:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 74059 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0KDG0Cv025797 for ; Wed, 20 Jan 2010 13:16:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111Ab0ATNP7 (ORCPT ); Wed, 20 Jan 2010 08:15:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752489Ab0ATNP6 (ORCPT ); Wed, 20 Jan 2010 08:15:58 -0500 Received: from smtp.mujha-vel.cz ([81.30.225.246]:53030 "EHLO smtp.mujha-vel.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601Ab0ATNP6 (ORCPT ); Wed, 20 Jan 2010 08:15:58 -0500 Received: from [217.66.174.142] (helo=localhost.localdomain) by smtp.mujha-vel.cz with esmtp (Exim 4.63) (envelope-from ) id 1NXaPc-0004H5-7a; Wed, 20 Jan 2010 14:15:56 +0100 From: Jiri Slaby To: jbarnes@virtuousgeek.org Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com, Scott Murray , linux-pci@vger.kernel.org Subject: [PATCH 1/1] PCI: hotplug/cpcihp, fix pci device refcounting Date: Wed, 20 Jan 2010 14:15:54 +0100 Message-Id: <1263993354-23066-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.6.5.7 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c index 148fb46..fb3f846 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c @@ -162,6 +162,7 @@ static int __init cpcihp_generic_init(void) dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0)); if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { err("Invalid bridge device %s", bridge); + pci_dev_put(dev); return -EINVAL; } bus = dev->subordinate;