[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1271043661.4957.13.camel@minskey-desktop>
Date: Mon, 12 Apr 2010 11:41:01 +0800
From: minskey <chaohong_guo@...ux.intel.com>
To: linux-kernel@...r.kernel.org
Cc: dan.j.williams@...el.com
Subject: [PATCH] ioatdma: Release memory in error handling path
Release memory in error handling path
Signed-off-by: Minskey Guo <chaohong_guo@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists