On 03/06/2014 10:11 AM, Dan Carpenter wrote:
On Thu, Mar 06, 2014 at 09:56:29AM -0500, Mark Hounschell wrote:
On 03/05/2014 04:47 PM, Dan Carpenter wrote:
On Wed, Mar 05, 2014 at 03:54:50PM -0500, Mark Hounschell wrote:
@@ -2953,7 +2955,8 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
                if (down_interruptible(&dgap_TmpWriteSem))
                        return -EINTR;

-               if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) 
buf, count)) {
+               if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *)buf,
+                                       count)) {
                        up(&dgap_TmpWriteSem);
                        return -EFAULT;
                }

This is dead code btw.  "from_user" is always false.


Are you saying that copy_from_user can never return anything but 0?

No.  This code looks buggy so I looked at the context.  There is
"from_user" variable which is always zero.  The buggy code is dead code.



Oh, I see. Might as well get removed then. I'll follow with one more in this series.
I found a little more dead code as well and will include that also.

mark

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to