linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user()
@ 2011-01-14  9:39 Axel Lin
  2011-01-18  4:38 ` [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-01-14  9:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Mack, Janine Kropp, Denis Oliver Kropp, Eric Miao,
	linux-fbdev

Return -EFAULT instead of number of bytes that could not be copied if
copy_from_user() fails.

Also fix a typo in the comments.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/video/pxa3xx-gcu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c
index b81168d..cf4beb9 100644
--- a/drivers/video/pxa3xx-gcu.c
+++ b/drivers/video/pxa3xx-gcu.c
@@ -1,5 +1,5 @@
 /*
- *  pxa3xx-gc.c - Linux kernel module for PXA3xx graphics controllers
+ *  pxa3xx-gcu.c - Linux kernel module for PXA3xx graphics controllers
  *
  *  This driver needs a DirectFB counterpart in user space, communication
  *  is handled via mmap()ed memory areas and an ioctl.
@@ -421,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff,
 		buffer->next = priv->free;
 		priv->free = buffer;
 		spin_unlock_irqrestore(&priv->spinlock, flags);
-		return ret;
+		return -EFAULT;
 	}
 
 	buffer->length = words;
-- 
1.7.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails
  2011-01-14  9:39 [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() Axel Lin
@ 2011-01-18  4:38 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-01-18  4:38 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Daniel Mack, Janine Kropp, Denis Oliver Kropp,
	Eric Miao, linux-fbdev

On Fri, Jan 14, 2011 at 05:39:11PM +0800, Axel Lin wrote:
> Return -EFAULT instead of number of bytes that could not be copied if
> copy_from_user() fails.
> 
> Also fix a typo in the comments.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-18  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14  9:39 [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() Axel Lin
2011-01-18  4:38 ` [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).