From: Markus Pargmann
> The first arugment has to be a pointer to the memory. buf is a char
> array and already a pointer itself. The current code passes a pointer to
> a char array to copy_from_user() which is not correct.
It doesn't matter, while the type of the argument is subtly different the
value passed is the same.
David
> Signed-off-by: Markus Pargmann <[email protected]>
> ---
> drivers/usb/musb/musb_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
> index ad3701a97389..bb13e0420140 100644
> --- a/drivers/usb/musb/musb_debugfs.c
> +++ b/drivers/usb/musb/musb_debugfs.c
> @@ -194,7 +194,7 @@ static ssize_t musb_test_mode_write(struct file *file,
>
> memset(buf, 0x00, sizeof(buf));
>
> - if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
> + if (copy_from_user(buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
> return -EFAULT;
>
> if (!strncmp(buf, "force host", 9))
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html