diff options
author | axel lin <axel.lin@gmail.com> | 2011-01-14 04:39:11 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-17 23:40:34 -0500 |
commit | 0b7f1cc79d61427961e311c6a21f528bdb226e40 (patch) | |
tree | 773b512ff69f55966af6ba0cc69bd82d85723b64 /drivers | |
parent | 6c9571f4b759717e1c938cbc6b53ec8ce5813245 (diff) |
video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails
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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 b81168df253d..cf4beb9dc9bb 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * pxa3xx-gc.c - Linux kernel module for PXA3xx graphics controllers | 2 | * pxa3xx-gcu.c - Linux kernel module for PXA3xx graphics controllers |
3 | * | 3 | * |
4 | * This driver needs a DirectFB counterpart in user space, communication | 4 | * This driver needs a DirectFB counterpart in user space, communication |
5 | * is handled via mmap()ed memory areas and an ioctl. | 5 | * is handled via mmap()ed memory areas and an ioctl. |
@@ -421,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff, | |||
421 | buffer->next = priv->free; | 421 | buffer->next = priv->free; |
422 | priv->free = buffer; | 422 | priv->free = buffer; |
423 | spin_unlock_irqrestore(&priv->spinlock, flags); | 423 | spin_unlock_irqrestore(&priv->spinlock, flags); |
424 | return ret; | 424 | return -EFAULT; |
425 | } | 425 | } |
426 | 426 | ||
427 | buffer->length = words; | 427 | buffer->length = words; |