From: minskey <chaohong_guo@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: dan.j.williams@intel.com
Subject: [PATCH] ioatdma: Release memory in error handling path
Date: Mon, 12 Apr 2010 11:41:01 +0800 [thread overview]
Message-ID: <1271043661.4957.13.camel@minskey-desktop> (raw)
Release memory in error handling path
Signed-off-by: Minskey Guo <chaohong_guo@linux.intel.com>
---
drivers/dma/ioat/pci.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c
index a6e93ee..2a3dae9 100644
--- a/drivers/dma/ioat/pci.c
+++ b/drivers/dma/ioat/pci.c
@@ -153,10 +153,12 @@ static int __devinit ioat_pci_probe(struct pci_dev
*pdev, const struct pci_devic
else if (device->version >= IOAT_VER_3_0)
err = ioat3_dma_probe(device, ioat_dca_enabled);
else
- return -ENODEV;
+ err = -ENODEV;
if (err) {
dev_err(dev, "Intel(R) I/OAT DMA Engine init failed\n");
+ pci_set_drvdata(pdev, NULL);
+ devm_kfree(dev, device)
return -ENODEV;
}
--
1.6.3.3
next reply other threads:[~2010-04-12 3:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 3:41 minskey [this message]
2010-04-12 4:00 ` [PATCH V2 ] ioatdma: Release memory in error handling path minskey
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=1271043661.4957.13.camel@minskey-desktop \
--to=chaohong_guo@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox