\r
#if defined(CONFIG_VCODEC_MMU)\r
// release memory region attach to this registers table.\r
- list_for_each_entry_safe(mem_region, n, ®->mem_region_list, reg_lnk) {\r
- ion_unmap_iommu(pservice->dev, pservice->ion_client, mem_region->hdl);\r
- ion_free(pservice->ion_client, mem_region->hdl);\r
- list_del_init(&mem_region->reg_lnk);\r
- kfree(mem_region);\r
+ if (pservice->mmu_dev) {\r
+ list_for_each_entry_safe(mem_region, n, ®->mem_region_list, reg_lnk) {\r
+ ion_unmap_iommu(pservice->dev, pservice->ion_client, mem_region->hdl);\r
+ ion_free(pservice->ion_client, mem_region->hdl);\r
+ list_del_init(&mem_region->reg_lnk);\r
+ kfree(mem_region);\r
+ }\r
}\r
#endif\r
\r