Skip to content

Commit

Permalink
niu: Fix error checking in niu_ethflow_to_class.
Browse files Browse the repository at this point in the history
The callers of niu_ethflow_to_class expect zero as error, but it returns
-1 instead.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andreas Schwab authored and David S. Miller committed Jul 30, 2008
1 parent 4a36702 commit 38c080f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6417,7 +6417,7 @@ static int niu_ethflow_to_class(int flow_type, u64 *class)
*class = CLASS_CODE_SCTP_IPV6;
break;
default:
return -1;
return 0;
}

return 1;
Expand Down

0 comments on commit 38c080f

Please sign in to comment.