Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dab0588f authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher
Browse files

ice: Fix potential return of uninitialized value



In ice_vsi_setup_[tx|rx]_rings, err is uninitialized which can result in
a garbage value return to the caller. Fix that.

Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent c7f2c42b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4885,7 +4885,7 @@ int ice_down(struct ice_vsi *vsi)
 */
 */
static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
{
{
	int i, err;
	int i, err = 0;


	if (!vsi->num_txq) {
	if (!vsi->num_txq) {
		dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Tx queues\n",
		dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Tx queues\n",
@@ -4910,7 +4910,7 @@ static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
 */
 */
static int ice_vsi_setup_rx_rings(struct ice_vsi *vsi)
static int ice_vsi_setup_rx_rings(struct ice_vsi *vsi)
{
{
	int i, err;
	int i, err = 0;


	if (!vsi->num_rxq) {
	if (!vsi->num_rxq) {
		dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Rx queues\n",
		dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Rx queues\n",