Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b7f1cc7 authored by Axel Lin's avatar Axel Lin Committed by Paul Mundt
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 6c9571f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 *  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;