OSDN Git Service

iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
[tomoyo/tomoyo-test1.git] / drivers / iommu / intel / dmar.c
index 5a8f780..bc94059 100644 (file)
@@ -820,6 +820,7 @@ int __init dmar_dev_scope_init(void)
                        info = dmar_alloc_pci_notify_info(dev,
                                        BUS_NOTIFY_ADD_DEVICE);
                        if (!info) {
+                               pci_dev_put(dev);
                                return dmar_dev_scope_status;
                        } else {
                                dmar_pci_bus_add_dev(info);