File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2155,21 +2155,13 @@ static void amd_iommu_detach_device(struct iommu_domain *dom,
2155
2155
static int amd_iommu_attach_device (struct iommu_domain * dom ,
2156
2156
struct device * dev )
2157
2157
{
2158
+ struct iommu_dev_data * dev_data = dev_iommu_priv_get (dev );
2158
2159
struct protection_domain * domain = to_pdomain (dom );
2159
- struct iommu_dev_data * dev_data ;
2160
- struct amd_iommu * iommu ;
2160
+ struct amd_iommu * iommu = rlookup_amd_iommu (dev );
2161
2161
int ret ;
2162
2162
2163
- if (!check_device (dev ))
2164
- return - EINVAL ;
2165
-
2166
- dev_data = dev_iommu_priv_get (dev );
2167
2163
dev_data -> defer_attach = false;
2168
2164
2169
- iommu = rlookup_amd_iommu (dev );
2170
- if (!iommu )
2171
- return - EINVAL ;
2172
-
2173
2165
if (dev_data -> domain )
2174
2166
detach_device (dev );
2175
2167
You can’t perform that action at this time.
0 commit comments