ia64/xen-unstable

changeset 8652:2b4b1963b76e

Fix an incorrect type, and a missing return value check,
in direct_remap_pfn_range().

Signed-off-by: Jan Beulich <JBeulich@novell.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jan 24 18:08:11 2006 +0100 (2006-01-24)
parents 71914b64b577
children 63d9f45b271d
files linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Tue Jan 24 18:05:45 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Tue Jan 24 18:08:11 2006 +0100
     1.3 @@ -52,8 +52,8 @@ static int __direct_remap_pfn_range(stru
     1.4  				    pgprot_t prot,
     1.5  				    domid_t  domid)
     1.6  {
     1.7 -	int i, rc;
     1.8 -	unsigned long start_address;
     1.9 +	int rc;
    1.10 +	unsigned long i, start_address;
    1.11  	mmu_update_t *u, *v, *w;
    1.12  
    1.13  	u = v = w = (mmu_update_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
    1.14 @@ -93,8 +93,10 @@ static int __direct_remap_pfn_range(stru
    1.15  
    1.16  	if (v != u) {
    1.17  		/* get the ptep's filled in */
    1.18 -		generic_page_range(mm, start_address, address - start_address,
    1.19 +		rc = generic_page_range(mm, start_address, address - start_address,
    1.20  				   direct_remap_area_pte_fn, &w);
    1.21 +		if (rc)
    1.22 +			goto out;
    1.23  		rc = -EFAULT;
    1.24  		if (unlikely(HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0))
    1.25  			goto out;