]> git.baikalelectronics.ru Git - kernel.git/commit
niu: fix error handling in niu_class_to_ethflow()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Feb 2015 16:56:56 +0000 (19:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Feb 2015 17:58:25 +0000 (12:58 -0500)
commitc805668af9d24c1697872d9e7569540d6f4eb884
tree3caa216d102215e4bf8ae1adfb6575eeb5e2ce64
parent53e4573e41c8e07ff1d38ee15bd11127234c80e6
niu: fix error handling in niu_class_to_ethflow()

There is a discrepancy here because the niu_class_to_ethflow() returns
zero on failure and one on success but the caller expected zero on
success and negative on failure.

The problem means that we allow the user to pass classes and flow_types
which we don't want.  I've looked at it a bit and I don't see it as a
very serious bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c