]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:31:18 +0000 (19:31 -0500)
commit57512155af3d636635434bd0f4f4220c7f44847b
treed8b0d123a18a7d6853731c8352227f44c893fd94
parenta7dea0604ae5e0321fd3af0be13d4ebf5e5f5006
i40e: Fix static analysis tool warning

Orabug: 24568124

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>
(cherry picked from commit 52a08caa0cd5b9b37020c96f2b59ce1160def8fa)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c