patch-2.4.20 linux-2.4.20/arch/s390x/kernel/debug.c

Next file: linux-2.4.20/arch/s390x/kernel/entry.S
Previous file: linux-2.4.20/arch/s390x/kernel/Makefile
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/arch/s390x/kernel/debug.c linux-2.4.20/arch/s390x/kernel/debug.c
@@ -443,6 +443,7 @@
 {
 	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);
@@ -458,9 +459,9 @@
 		size = MIN((len - count), (size - entry_offset));
 
 		if(size){
-			if (copy_to_user(user_buf + count, 
-					p_info->temp_buf + entry_offset, size))
-				return count ? count : -EFAULT;
+			if ((rc = copy_to_user(user_buf + count, 
+					p_info->temp_buf + entry_offset, size)))
+			return rc;
 		}
 		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)