@@ -1123,29 +1123,15 @@ static int omap_iommu_dra7_get_dsp_system_cfg(struct platform_device *pdev,
11231123 struct omap_iommu * obj )
11241124{
11251125 struct device_node * np = pdev -> dev .of_node ;
1126- int ret ;
11271126
11281127 if (!of_device_is_compatible (np , "ti,dra7-dsp-iommu" ))
11291128 return 0 ;
11301129
1131- if (!of_property_read_bool (np , "ti,syscon-mmuconfig" )) {
1132- dev_err (& pdev -> dev , "ti,syscon-mmuconfig property is missing\n" );
1133- return - EINVAL ;
1134- }
1135-
1136- obj -> syscfg =
1137- syscon_regmap_lookup_by_phandle (np , "ti,syscon-mmuconfig" );
1138- if (IS_ERR (obj -> syscfg )) {
1139- /* can fail with -EPROBE_DEFER */
1140- ret = PTR_ERR (obj -> syscfg );
1141- return ret ;
1142- }
1143-
1144- if (of_property_read_u32_index (np , "ti,syscon-mmuconfig" , 1 ,
1145- & obj -> id )) {
1146- dev_err (& pdev -> dev , "couldn't get the IOMMU instance id within subsystem\n" );
1147- return - EINVAL ;
1148- }
1130+ obj -> syscfg = syscon_regmap_lookup_by_phandle_args (np , "ti,syscon-mmuconfig" ,
1131+ 1 , & obj -> id );
1132+ if (IS_ERR (obj -> syscfg ))
1133+ return dev_err_probe (& pdev -> dev , PTR_ERR (obj -> syscfg ),
1134+ "ti,syscon-mmuconfig property is missing\n" );
11491135
11501136 if (obj -> id != 0 && obj -> id != 1 ) {
11511137 dev_err (& pdev -> dev , "invalid IOMMU instance id\n" );
0 commit comments