ia64/xen-unstable

changeset 8845:fcc833cbaf82

Return real error code from Xen /dev/mem, not EAGAIN.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Feb 13 17:41:23 2006 +0100 (2006-02-13)
parents d6b16f57058a
children b9b411b50587
files linux-2.6-xen-sparse/drivers/xen/char/mem.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c	Mon Feb 13 16:47:04 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c	Mon Feb 13 17:41:23 2006 +0100
     1.3 @@ -96,12 +96,9 @@ static int mmap_mem(struct file * file, 
     1.4  	if (uncached_access(file))
     1.5  		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
     1.6  
     1.7 -	if (direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
     1.8 -				   size,
     1.9 -				   vma->vm_page_prot, DOMID_IO))
    1.10 -		return -EAGAIN;
    1.11 -
    1.12 -	return 0;
    1.13 +	/* We want to return the real error code, not EAGAIN. */
    1.14 +	return direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
    1.15 +				      size, vma->vm_page_prot, DOMID_IO);
    1.16  }
    1.17  
    1.18  /*