File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -1256,14 +1256,6 @@ static int rk_iommu_probe(struct platform_device *pdev)
1256
1256
if (err )
1257
1257
return err ;
1258
1258
1259
- err = iommu_device_sysfs_add (& iommu -> iommu , dev , NULL , dev_name (dev ));
1260
- if (err )
1261
- goto err_unprepare_clocks ;
1262
-
1263
- err = iommu_device_register (& iommu -> iommu , & rk_iommu_ops , dev );
1264
- if (err )
1265
- goto err_remove_sysfs ;
1266
-
1267
1259
/*
1268
1260
* Use the first registered IOMMU device for domain to use with DMA
1269
1261
* API, since a domain might not physically correspond to a single
@@ -1290,12 +1282,19 @@ static int rk_iommu_probe(struct platform_device *pdev)
1290
1282
1291
1283
dma_set_mask_and_coherent (dev , rk_ops -> dma_bit_mask );
1292
1284
1285
+ err = iommu_device_sysfs_add (& iommu -> iommu , dev , NULL , dev_name (dev ));
1286
+ if (err )
1287
+ goto err_pm_disable ;
1288
+
1289
+ err = iommu_device_register (& iommu -> iommu , & rk_iommu_ops , dev );
1290
+ if (err )
1291
+ goto err_remove_sysfs ;
1292
+
1293
1293
return 0 ;
1294
- err_pm_disable :
1295
- pm_runtime_disable (dev );
1296
1294
err_remove_sysfs :
1297
1295
iommu_device_sysfs_remove (& iommu -> iommu );
1298
- err_unprepare_clocks :
1296
+ err_pm_disable :
1297
+ pm_runtime_disable (dev );
1299
1298
clk_bulk_unprepare (iommu -> num_clocks , iommu -> clocks );
1300
1299
return err ;
1301
1300
}
You can’t perform that action at this time.
0 commit comments