Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3764009pxt; Tue, 10 Aug 2021 10:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIHuiuBoRDtev4tlt4Szo/Q5EqUU/B4ZfqZPYlaosKOsbLUPsFb0PehV68rB4okaIgFeu5 X-Received: by 2002:a92:dd0a:: with SMTP id n10mr56999ilm.301.1628617571147; Tue, 10 Aug 2021 10:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617571; cv=none; d=google.com; s=arc-20160816; b=rrUSR3pMe8UXZh09J3zLrYYbqrkYMKx6x1Z+4GB27SCcS+Jcx077FceqTIOB0SJ6kQ maSA9i8d6qohgrx8nMlKKaMtCIHtokXVyQw/nj4Drh+LzmtbC1YecmZaLNy4A2pHct3b W7FKVvQU58YAmw/3GTOin/7DFX3fAFxuGnD135qQFQ55cOkAAa7pLeBFHioMsEWl8G6R WRva6rFcboesUqjFlzwTYKNqCmGjZgmrfUQCFIfFOUCW7jAoRd+8BHPPspY1bGH6rUuk aEO9fDvhmVBl13unPVP074R2feaBphZL4OgJ9V+5i7okd74agoYWU6RXR5LeERc7F3Lh Coxw== 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=meR90uJB4GqKBYTxrkFSOD5pQek6OKbES2NfZf5MFRc=; b=dVZcY79CPad5XUC45dtZHXJdX37Cv/I8LT4K5wdjwl6Z8NBAedWohCmnewLbKbeRfC JlUBaQ7CAu1goLPGNY5FMewJzoja0MCvN68l/U8IZS7jcvKybJjVOuxrUnXnlwQ8RVCc zVLcG9Knq/3T9tOy6GP+gU+LVB+ae/sSpqfpivf72NE7NFuR5gpxNXxdqcs6Hx7g74/w 2ntjUD4YceHYZnENIJ/z5wbdylBiUbzfRnJFOR9G72VHJemOiv2ZQgDB6Snr9qP/sS+b SoR+YLcK/u8mHH3fP9HpMFwo22OosTvva6ccL7KaxcvLVl34p+x4PCQgVT8jNT8+W3RD 0n9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DkXuU/8t"; 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 ay9si8852510iob.85.2021.08.10.10.45.58; Tue, 10 Aug 2021 10:46: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="DkXuU/8t"; 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 S232243AbhHJRp0 (ORCPT + 99 others); Tue, 10 Aug 2021 13:45:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:59194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234009AbhHJRlb (ORCPT ); Tue, 10 Aug 2021 13:41:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A6B86120D; Tue, 10 Aug 2021 17:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617101; bh=D3vvCFp/rZwWniXsWQktlYgr/FRH5Z/L3Rmkokq0q7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DkXuU/8tCoaCDrb2Bi3MJomT0wWfWJXjatLo+P1lNYyqBp18wcB17gvW5e+9KYzN9 65akVcWvOxKwejH+tuIOZlqFZVkL1vkWbtEkHfCix9kU0QNX1AKDTY6obb+RKBhEZn V6fNhNrZq+NP/gMV63zwfFNcdix7tktddoFtUUGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 046/135] bnx2x: fix an error code in bnx2x_nic_load() Date: Tue, 10 Aug 2021 19:29:40 +0200 Message-Id: <20210810172957.251780939@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@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: Dan Carpenter [ Upstream commit fb653827c758725b149b5c924a5eb50ab4812750 ] Set the error code if bnx2x_alloc_fw_stats_mem() fails. The current code returns success. Fixes: ad5afc89365e ("bnx2x: Separate VF and PF logic") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 1a6ec1a12d53..b5d954cb409a 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2669,7 +2669,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode) } /* Allocated memory for FW statistics */ - if (bnx2x_alloc_fw_stats_mem(bp)) + rc = bnx2x_alloc_fw_stats_mem(bp); + if (rc) LOAD_ERROR_EXIT(bp, load_error0); /* request pf to initialize status blocks */ -- 2.30.2