Commit bf0813bd282f6ded0a5efca3db238287f7a3dbe8

Authored by Paul Gortmaker
Committed by David S. Miller
1 parent 974c12360d

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -767,8 +767,8 @@
767 767 return i;
768 768 }
769 769  
770   -static unsigned long num_arg(const char __user * user_buffer,
771   - unsigned long maxlen, unsigned long *num)
  770 +static long num_arg(const char __user *user_buffer, unsigned long maxlen,
  771 + unsigned long *num)
772 772 {
773 773 int i;
774 774 *num = 0;