patch-2.4.21 linux-2.4.21/drivers/char/sx.c
Next file: linux-2.4.21/drivers/char/tipar.c
Previous file: linux-2.4.21/drivers/char/sonypi.h
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
2003-06-13 07:51:33.000000000 -0700
- Orig file:
linux-2.4.20/drivers/char/sx.c
- Orig date:
2002-11-28 15:53:12.000000000 -0800
diff -urN linux-2.4.20/drivers/char/sx.c linux-2.4.21/drivers/char/sx.c
@@ -1734,8 +1734,10 @@
if (copy_from_user(tmp, (char *)data + i,
(i + SX_CHUNK_SIZE >
nbytes) ? nbytes - i :
- SX_CHUNK_SIZE))
+ SX_CHUNK_SIZE)) {
+ kfree (tmp);
return -EFAULT;
+ }
memcpy_toio ((char *) (board->base2 + offset + i), tmp,
(i+SX_CHUNK_SIZE>nbytes)?nbytes-i:SX_CHUNK_SIZE);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)