]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Fix for unused value issue found by static analysis
authorCarolyn Wyborny <carolyn.wyborny@intel.com>
Fri, 14 Jul 2017 13:10:07 +0000 (09:10 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:25 +0000 (14:15 -0700)
This patch fixes an issue where an error return value is
set, but without an immediate exit, the value can be overwritten
by the following code execution.  The condition  at this point
is not fatal, so remove the error assignment and comment the
intent for future code maintainers

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit 19279235bea221798e3307a8bec2c02559cab0c5)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 82bdbd6993967385b037672b5a3cd7d05f34bb79..2999724de9003ac2df01f37280c27e4cf149880b 100644 (file)
@@ -9795,13 +9795,15 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
                         */
                        ret = i40e_vsi_config_tc(vsi, enabled_tc);
                        if (ret) {
+                               /* Single TC condition is not fatal,
+                                * message and continue
+                                */
                                dev_info(&pf->pdev->dev,
                                         "failed to configure TCs for main VSI tc_map 0x%08x, err %s aq_err %s\n",
                                         enabled_tc,
                                         i40e_stat_str(&pf->hw, ret),
                                         i40e_aq_str(&pf->hw,
                                                    pf->hw.aq.asq_last_status));
-                               ret = -ENOENT;
                        }
                }
                break;