Skip to content

Commit

Permalink
video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
axel lin authored and Paul Mundt committed Jan 18, 2011
1 parent 6c9571f commit 0b7f1cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/pxa3xx-gcu.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0b7f1cc

Please sign in to comment.