]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix static analysis tool warning
authorDave Ertman <david.m.ertman@intel.com>
Wed, 27 Jul 2016 19:02:34 +0000 (12:02 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 18 Aug 2016 18:43:11 +0000 (11:43 -0700)
commitbaf8485cac87d338748fdc2f83cec3ed67494c3a
treed622bfe575eb75361a5bc3ffc80f1a3eb651f9ef
parent9efe8980e94c59bc5cbd8ea5bc2d07d61bc841cb
i40e: Fix static analysis tool warning

This patch fixes a problem where a static analysis tool generates
a warning for "INVARIANT_CONDITION: Expression 'enabled_tc' used
in the condition always yields the same result."

Without this patch, the driver will not pass the static analysis
tool checks without generating warnings.

This patch fixes the problem by eliminating the irrelevant check
and redundant assignment for the value of enabled_tc.

Change-ID: Ia7d44cb050f507df7de333e96369d322e08bf408
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c