1
0
Fork 0

pktgen: Fix unsigned function that is returning negative vals

Every call to num_args() immediately checks the return value for
less than zero, as it will return -EFAULT for a failed get_user()
call.  So it makes no sense for the function to be declared as an
unsigned long.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
wifi-calibration
Paul Gortmaker 2012-01-19 15:40:06 +00:00 committed by David S. Miller
parent 974c12360d
commit bf0813bd28
1 changed files with 2 additions and 2 deletions

View File

@ -767,8 +767,8 @@ done:
return i;
}
static unsigned long num_arg(const char __user * user_buffer,
unsigned long maxlen, unsigned long *num)
static long num_arg(const char __user *user_buffer, unsigned long maxlen,
unsigned long *num)
{
int i;
*num = 0;