passthrough: remove pointless error checks
PATCH 1/1 passthrough: remove pointless error checks
map_domain_page() cannot return NULL. And if it could, both instances changed here would leak memory in such a case.
Signed-off-by Jan Beulich <[email protected]>
xen/drivers/passthrough/vtd/iommu.c +0 -2
@@ -156,8 +156,6 @@ u64 alloc_pgtable_maddr(struct acpi_drhdif ( !pg )return 0 ; vaddr =map_domain_page (page_to_mfn (pg)); -if ( !vaddr ) -return 0 ;memset (vaddr,0 ,PAGE_SIZE * npages);iommu_flush_cache_page (vaddr, npages);
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h +0 -2
@@ -131,8 +131,6 @@ static inline struct page_info* alloc_amif ( pg ==NULL )return 0 ; vaddr =map_domain_page (page_to_mfn (pg)); -if ( vaddr ==NULL ) -return 0 ;memset (vaddr,0 ,PAGE_SIZE );unmap_domain_page (vaddr);return pg;