iommu/vt-d: Fix reference count in iommu_prepare_isa
authorYijing Wang <wangyijing@huawei.com>
Tue, 20 May 2014 12:37:52 +0000 (20:37 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 4 Jul 2014 09:34:13 +0000 (11:34 +0200)
Decrease the device reference count avoid memory leak.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index 219c2c51a3122504e1dd357aa02c5de6f5175246..9b9f28ea3db25651388ff7766219996354442b42 100644 (file)
@@ -2403,6 +2403,7 @@ static inline void iommu_prepare_isa(void)
                printk(KERN_ERR "IOMMU: Failed to create 0-16MiB identity map; "
                       "floppy might not work\n");
 
+       pci_dev_put(pdev);
 }
 #else
 static inline void iommu_prepare_isa(void)