iommu/vt-d: Free resources if failed to create domain for PCIe endpoint
authorJiang Liu <jiang.liu@linux.intel.com>
Wed, 19 Feb 2014 06:07:27 +0000 (14:07 +0800)
committerJoerg Roedel <joro@8bytes.org>
Tue, 4 Mar 2014 16:51:01 +0000 (17:51 +0100)
commite85bb5d4d1d5ef55cf4fbb4da5dda67d2bbacc5c
tree62c55a6b27f820677c758ace5533bd7cf095db7a
parent745f2586e78efc5c226a60cfc8e7fbd735b1c856
iommu/vt-d: Free resources if failed to create domain for PCIe endpoint

Enhance function get_domain_for_dev() to release allocated resources
if failed to create domain for PCIe endpoint, otherwise the allocated
resources will get lost.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/intel-iommu.c