]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: dcb: check setup_tc return codes
authorJohn Fastabend <john.r.fastabend@intel.com>
Fri, 10 Feb 2012 03:19:35 +0000 (03:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 3 Mar 2012 02:11:24 +0000 (18:11 -0800)
commit93d3cafbd29487a7db120ae2049a5b989980a908
tree26f7026391dc63d31cf94ed33730bc2fc1ab25f6
parentf5e0342356f9035cb6534f8fcd9ed0fb86ba3d15
ixgbe: dcb: check setup_tc return codes

dcb netlink code calls setup_tc to init hardware traffic classes
to use for DCB. At some call sites the return values are not
checked for errors and in one case may return -EINVAL back to
the net/dcbnl.c caller which is expecting a u8.

This fixes some smatch hits and although failures are never
seen in practive its best to check return codes.

Reported-by: Dan Carenter <dan.carpenter@oracle.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c