Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3936286pxj; Mon, 21 Jun 2021 09:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz39AL2MrE/QCCi5O//kxHfj2l071xr6mY0VLm3qy9MoLhMcvL41YM5KRdHXflxyJgiXJ+N X-Received: by 2002:a05:6402:6d1:: with SMTP id n17mr22816052edy.116.1624293851977; Mon, 21 Jun 2021 09:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293851; cv=none; d=google.com; s=arc-20160816; b=0F3bBit9Bl23GqwECfoVdqbHPubfWC6u4V915KGXxnRY1mPTqXC94TOsTkhyGvwzYx +WWQsFjN7WjsbKzoLXbAuwaPJwO2GCqT92r7cUvz1b3pSz9a66s5fpjoveGafLZBDdfO kihTC5LwZmzL8mIkZ/IQGGyVEMTrZTned0+nm3ev++CDwbJeX9189gomOzc6EvFtOwxk 0g+4HlRB7tb9FobY5a4U7OELCr6ZzqXLOU5UDIV22QGL3omq4Uvxyqr8fgVQqILbuZYb mDV9MyT3xmO1KITEH4+Qbbd0OV2kfSg5sFwPJBPjL2o/1naOkBaAcvzFYJHrIecc7PNL AMrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X/GcXRjLWqxiUEeAD/swrRe7UACD5213UZ6uV2tbF0g=; b=grAEasAOJS2ov0CV3Igw11UsUKolMFKdkOuAcs4b24LbW/Ho6srj+3ZW1tZonqGM/n 2Rkb/E8Gmx5t1WMWp0foZAW2heP/yf2mZkcQ1Q9itn2QOSqSqyE3s24An5VpXBWSbX2l ykI+F39YB7K2qsWOePjsUAeyvgFWE+zGg65F0QDinHO3iYKaZ/La45F9jHtPt9zrC044 ywkul6cd0F2IWxa2ZNEYqBsxTV1y7+6ZiRtmguX2V2kxrrQhn+hYP0LFxNWoEdDj2chT MsUsddYgpVS4lqtQhxzd1KVq+lzfIWfgaaoAWcR2qbhCxh68qdURO0Y4XGkfAU9ETsuU jnew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A9hnrDdh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gq9si10535566ejb.720.2021.06.21.09.43.48; Mon, 21 Jun 2021 09:44:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A9hnrDdh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233318AbhFUQoD (ORCPT + 99 others); Mon, 21 Jun 2021 12:44:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:33622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233527AbhFUQj7 (ORCPT ); Mon, 21 Jun 2021 12:39:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3736C61440; Mon, 21 Jun 2021 16:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293024; bh=NnmdTo0pZwz9oc4CTfDc3hFC/2al5IuxrtxBXtEDhoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A9hnrDdhd0z74AJpefv2BJcvk98BYembVCaphFfureOMbrnftk947z/wQhuO0VY6J I/TcLklydiPxuIflh9QDu3LJT/HlF41W5X00rZUFFdt1SRRTcowxedzYfv+z+ki8jp ZgvOM+v3sMJODor5rsOXQayisi1Wjfl0E771/Xtk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Saeed Mahameed , Moshe Shemesh , Leon Romanovsky , Parav Pandit , Sasha Levin Subject: [PATCH 5.12 071/178] net/mlx5: Fix error path for set HCA defaults Date: Mon, 21 Jun 2021 18:14:45 +0200 Message-Id: <20210621154924.969626449@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky [ Upstream commit 94a4b8414d3e91104873007b659252f855ee344a ] In the case of the failure to execute mlx5_core_set_hca_defaults(), we used wrong goto label to execute error unwind flow. Fixes: 5bef709d76a2 ("net/mlx5: Enable host PF HCA after eswitch is initialized") Reviewed-by: Saeed Mahameed Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index efb93d63e54c..58b8f75d7a01 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1157,7 +1157,7 @@ static int mlx5_load(struct mlx5_core_dev *dev) err = mlx5_core_set_hca_defaults(dev); if (err) { mlx5_core_err(dev, "Failed to set hca defaults\n"); - goto err_sriov; + goto err_set_hca; } mlx5_vhca_event_start(dev); @@ -1190,6 +1190,7 @@ err_ec: mlx5_sf_hw_table_destroy(dev); err_vhca: mlx5_vhca_event_stop(dev); +err_set_hca: mlx5_cleanup_fs(dev); err_fs: mlx5_accel_tls_cleanup(dev); -- 2.30.2