From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Daniel Mack <daniel@caiaq.de>, Janine Kropp <nin@directfb.org>,
Denis Oliver Kropp <dok@directfb.org>,
Eric Miao <eric.y.miao@gmail.com>,
linux-fbdev@vger.kernel.org
Subject: [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user()
Date: Fri, 14 Jan 2011 09:39:11 +0000 [thread overview]
Message-ID: <1294997951.12295.1.camel@mola> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Daniel Mack <daniel@caiaq.de>, Janine Kropp <nin@directfb.org>,
Denis Oliver Kropp <dok@directfb.org>,
Eric Miao <eric.y.miao@gmail.com>,
linux-fbdev@vger.kernel.org
Subject: [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails
Date: Fri, 14 Jan 2011 17:39:11 +0800 [thread overview]
Message-ID: <1294997951.12295.1.camel@mola> (raw)
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
next reply other threads:[~2011-01-14 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 9:39 Axel Lin [this message]
2011-01-14 9:39 ` [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails Axel Lin
2011-01-18 4:38 ` Paul Mundt
2011-01-18 4:38 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1294997951.12295.1.camel@mola \
--to=axel.lin@gmail.com \
--cc=daniel@caiaq.de \
--cc=dok@directfb.org \
--cc=eric.y.miao@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nin@directfb.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.