[PATCH v2] iommu/amd: Add proper error check in two functions

2016-06-15 Thread Wan Zongshun
From: Wan Zongshun This patch is to do the following: 1. Add error check for caller of iommu_device_create. 2. Add error check for caller of iommu_device_link and move 'iommu = amd_iommu_rlookup_table[dev_data->devid]' out of iommuv2 capability condition that make

[PATCH v2] iommu/amd: Add proper error check in two functions

2016-06-15 Thread Wan Zongshun
From: Wan Zongshun This patch is to do the following: 1. Add error check for caller of iommu_device_create. 2. Add error check for caller of iommu_device_link and move 'iommu = amd_iommu_rlookup_table[dev_data->devid]' out of iommuv2 capability condition that make iommu_device_link also use