iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device()
@ 2013-05-02 15:24 Radmila Kompová
       [not found] ` <51828529.90900-qjZHU19XGF/maGwbMATS8qVXKuFTiq87@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Radmila Kompová @ 2013-05-02 15:24 UTC (permalink / raw)
  To: iommu; +Cc: linux-kernel

Detected by cppcheck.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
 drivers/iommu/amd_iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 8301837..5523ffb 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -448,8 +448,10 @@ static int iommu_init_device(struct device *dev)
 	}

 	ret = init_iommu_group(dev);
-	if (ret)
+	if (ret) {
+		free_dev_data(dev_data);
 		return ret;
+	}

 	if (pci_iommuv2_capable(pdev)) {
 		struct amd_iommu *iommu;
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device()
       [not found] ` <51828529.90900-qjZHU19XGF/maGwbMATS8qVXKuFTiq87@public.gmane.org>
@ 2013-08-14 20:25   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2013-08-14 20:25 UTC (permalink / raw)
  To: Radmila Kompová
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, May 02, 2013 at 05:24:25PM +0200, Radmila Kompová wrote:
> Detected by cppcheck.
> 
> Signed-off-by: Kamil Dudka <kdudka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Applied to x86/amd, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-14 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 15:24 [PATCH 1/2] drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device() Radmila Kompová
     [not found] ` <51828529.90900-qjZHU19XGF/maGwbMATS8qVXKuFTiq87@public.gmane.org>
2013-08-14 20:25   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).