patch-2.4.19 linux-2.4.19/arch/s390/kernel/debug.c

Next file: linux-2.4.19/arch/s390/kernel/entry.S
Previous file: linux-2.4.19/arch/s390/kernel/asm-offsets.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/s390/kernel/debug.c linux-2.4.19/arch/s390/kernel/debug.c
@@ -443,7 +443,6 @@
 {
 	size_t count = 0;
 	size_t entry_offset, size = 0;
-	int rc;
 	file_private_info_t *p_info;
 
 	p_info = ((file_private_info_t *) file->private_data);
@@ -459,9 +458,9 @@
 		size = MIN((len - count), (size - entry_offset));
 
 		if(size){
-			if ((rc = copy_to_user(user_buf + count, 
-					p_info->temp_buf + entry_offset, size)))
-			return rc;
+			if (copy_to_user(user_buf + count, 
+					p_info->temp_buf + entry_offset, size))
+				return count ? count: -EFAULT;
 		}
 		count += size;
 		entry_offset = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)