提交 c9cf272b 编写于 作者: G Guenter Roeck 提交者: Greg Kroah-Hartman

staging: dgrp: Drop unnecessary typecast

An unnecessary typecast in dgrp_net_ops.c causes the following build error
if compiled with W=1.

In function ‘copy_from_user’, inlined from ‘dgrp_net_ioctl’ at
    drivers/staging/dgrp/dgrp_net_ops.c:3408:21:
    arch/x86/include/asm/uaccess_32.h:211:26: error: call to
    ‘copy_from_user_overflow’ declared with attribute error: copy_from_user()
    buffer size is not provably correct
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e85b315e
......@@ -3405,7 +3405,7 @@ static long dgrp_net_ioctl(struct file *file, unsigned int cmd,
if (size != sizeof(struct link_struct))
return -EINVAL;
if (copy_from_user((void *)(&link), (void __user *) arg, size))
if (copy_from_user(&link, (void __user *)arg, size))
return -EFAULT;
if (link.lk_fast_rate < 9600)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册