ia64/xen-unstable

changeset 8411:101ae33a8341

Small fix to the error-return path after calling
__copy_to_user in the swiotlb sync function. We cannot
immediately exit the sync function as there may be tail work
to do (e.g., kunmap_atomic). In fact, doing nothing is the
right thing to do and is sufficient to avoid compiler
warnings about not checking the __copy_to_user return value.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Dec 17 02:11:54 2005 +0100 (2005-12-17)
parents b92ca87a2403
children 381cafbbc3d2
files linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Sat Dec 17 00:43:00 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Sat Dec 17 02:11:54 2005 +0100
     1.3 @@ -223,7 +223,7 @@ static void
     1.4  			host = kmp + buffer.offset;
     1.5  			if (dir == DMA_FROM_DEVICE) {
     1.6  				if (__copy_to_user(host, dev, bytes))
     1.7 -					return; /* inaccessible */
     1.8 +					/* inaccessible */;
     1.9  			} else
    1.10  				memcpy(dev, host, bytes);
    1.11  			kunmap_atomic(kmp, KM_SWIOTLB);
    1.12 @@ -236,7 +236,7 @@ static void
    1.13  			page_to_pseudophys(buffer.page)) + buffer.offset;
    1.14  		if (dir == DMA_FROM_DEVICE) {
    1.15  			if (__copy_to_user(host, dma_addr, size))
    1.16 -				return; /* inaccessible */
    1.17 +				/* inaccessible */;
    1.18  		} else if (dir == DMA_TO_DEVICE)
    1.19  			memcpy(dma_addr, host, size);
    1.20  	}