From: Jesper Juhl Date: Sat, 25 Mar 2006 11:07:02 +0000 (-0800) Subject: [PATCH] ISDN: fix copy_to_user() unused result warning in isdn_ppp X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c41a24ce1fe13638732885859011321af862960a;p=openwrt%2Fstaging%2Fblogic.git [PATCH] ISDN: fix copy_to_user() unused result warning in isdn_ppp drivers/isdn/i4l/isdn_ppp.c:785: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl Signed-off-by: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 1a19a0f89428..b9fed8a3bcc6 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -782,7 +782,8 @@ isdn_ppp_read(int min, struct file *file, char __user *buf, int count) is->first = b; spin_unlock_irqrestore(&is->buflock, flags); - copy_to_user(buf, save_buf, count); + if (copy_to_user(buf, save_buf, count)) + count = -EFAULT; kfree(save_buf); return count;