]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: fix incorrect variable assignment
authorGustavo A R Silva <garsilva@embeddedor.com>
Thu, 15 Jun 2017 02:38:26 +0000 (21:38 -0500)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
Fix incorrect variable assignment.
Based on line 1511: aq_ret = I40_ERR_PARAM; the correct variable to be
used in this instance is aq_ret instead of ret. Also, variable ret is
updated at line 1602 just before return, so assigning a value to this
variable in this code block is useless.

Addresses-Coverity-ID: 1397693
Signed-off-by: Gustavo A R Silva <garsilva@embeddedor.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@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 db1a8f8e833037a8ed0f333243d0c90d18acb62f)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 92a6a3105915fdeedba0b539aedac96683a97b4a..9549d9f253e10c845b54d89e04e3ae71ea8f175a 100644 (file)
@@ -1562,7 +1562,7 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
                        dev_err(&pf->pdev->dev,
                                "VF %d requested polling mode: this feature is supported only when the device is running in single function per port (SFP) mode\n",
                                 vf->vf_id);
-                       ret = I40E_ERR_PARAM;
+                       aq_ret = I40E_ERR_PARAM;
                        goto err;
                }
                vfres->vf_offload_flags |= I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING;