drivers/isdn/pcbit/* - compile warning
PATCH 7/21 drivers/isdn/pcbit/* - compile warning
Description: compile warning cleanup - handle copy_to/from_user error returns
Signed-off-by Stephen Biggs <[email protected]>
drivers/isdn/pcbit/drv.c +9 -6
@@ -727,23 +727,26 @@ int pcbit_stat(u_char __user *buf, int lif (stat_st < stat_end) { -copy_to_user (buf, statbuf + stat_st, len); +if (copy_to_user (buf, statbuf + stat_st, len)) +return -EFAULT ; stat_st += len; }else {if (len >STATBUF_LEN - stat_st) { -copy_to_user (buf, statbuf + stat_st, -STATBUF_LEN - stat_st); -copy_to_user (buf, statbuf, - len - (STATBUF_LEN - stat_st)); +if (copy_to_user (buf, statbuf + stat_st, +STATBUF_LEN - stat_st) || +copy_to_user (buf, statbuf, + len - (STATBUF_LEN - stat_st))) +return -EFAULT ; stat_st = len - (STATBUF_LEN - stat_st); }else { -copy_to_user (buf, statbuf + stat_st, len); +if (copy_to_user (buf, statbuf + stat_st, len)) +return -EFAULT ; stat_st += len;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors