浏览代码

usb: musb: debugfs: improve copy_from_user() argument

While the code is correct and functions well, it's still
a bit misleading to add the reference operator in from of
the buf argument.

This patch simply removes that operator in order to make
use of buf slightly better to the eyes.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Markus Pargmann 10 年之前
父节点
当前提交
fe198e34a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/musb/musb_debugfs.c

+ 1 - 1
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))