patch-2.4.8 linux/drivers/char/mem.c
Next file: linux/drivers/char/moxa.c
Previous file: linux/drivers/char/drm/vm.c
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Sat Jul 28 12:37:23 2001
- Orig file:
v2.4.7/linux/drivers/char/mem.c
- Orig date:
Wed Jul 25 17:10:19 2001
diff -u --recursive --new-file v2.4.7/linux/drivers/char/mem.c linux/drivers/char/mem.c
@@ -260,7 +260,9 @@
if (len > PAGE_SIZE)
len = PAGE_SIZE;
len = vread(kbuf, (char *)p, len);
- if (len && copy_to_user(buf, kbuf, len)) {
+ if (!len)
+ break;
+ if (copy_to_user(buf, kbuf, len)) {
free_page((unsigned long)kbuf);
return -EFAULT;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)