From: Levente Kurusa <levex@linux.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Levente Kurusa <levex@linux.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Andrew Murray <amurray@embedded-bits.co.uk>,
Myron Stowe <myron.stowe@redhat.com>,
linux-pci@vger.kernel.org
Subject: [PATCH 32/38] pcie: add missing put_device call
Date: Thu, 19 Dec 2013 16:06:46 +0100 [thread overview]
Message-ID: <1387465612-3673-33-git-send-email-levex@linux.com> (raw)
This is required so that we give up the last reference to the device.
Removed the kfree() as put_device will result in release_pcie_device being
called and hence the container of the device will be kfree'd.
Signed-off-by: Levente Kurusa <levex@linux.com>
---
drivers/pci/pcie/portdrv_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 08d131f..80fb1f2 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -345,7 +345,7 @@ static int pcie_device_init(struct pci_dev *pdev, int service, int irq)
retval = device_register(device);
if (retval)
- kfree(pcie);
+ put_device(device);
else
get_device(device);
return retval;
--
1.8.3.1
next reply other threads:[~2013-12-19 15:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 15:06 Levente Kurusa [this message]
2013-12-19 15:06 ` [PATCH 33/38] scsi: transport: add missing put_device call Levente Kurusa
2013-12-19 15:19 ` James Bottomley
2013-12-19 15:06 ` [PATCH 34/38] infiniband: core: " Levente Kurusa
2013-12-19 15:06 ` [PATCH 35/38] media: bt8xx: " Levente Kurusa
2013-12-19 15:06 ` [PATCH 36/38] dio: " Levente Kurusa
2013-12-19 15:06 ` [PATCH 37/38] uwb: umc-dev: " Levente Kurusa
2013-12-19 15:06 ` [PATCH 38/38] bcma: " Levente Kurusa
2013-12-19 22:10 ` [PATCH 32/38] pcie: " Bjorn Helgaas
2013-12-19 22:34 ` Greg Kroah-Hartman
2013-12-20 6:15 ` Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387465612-3673-33-git-send-email-levex@linux.com \
--to=levex@linux.com \
--cc=amurray@embedded-bits.co.uk \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=myron.stowe@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.