Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf0813bd authored by Paul Gortmaker's avatar Paul Gortmaker Committed by David S. Miller
Browse files

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: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 974c1236
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -767,8 +767,8 @@ static int count_trail_chars(const char __user * user_buffer,
	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;