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 <jbeulich@novell.com>
This commit is contained in:
Keir Fraser committed 2009-09-15 09:06:46 +01:00
1 parent daf7926d53
commit c331a144c0
2 files changed
-4

No files matched your search

-2
View File
@@ -156,8 +156,6 @@ u64 alloc_pgtable_maddr(struct acpi_drhd_unit *drhd, unsigned long npages)
if ( !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);
@@ -131,8 +131,6 @@ static inline struct page_info* alloc_amd_iommu_pgtable(void)
if ( 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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.