Skip to content

Commit

Permalink
staging: dgrp: Drop unnecessary typecast
Browse files Browse the repository at this point in the history
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: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Guenter Roeck authored and Greg Kroah-Hartman committed Mar 11, 2013
1 parent e85b315 commit c9cf272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/dgrp/dgrp_net_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c9cf272

Please sign in to comment.