Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp875292pxb; Fri, 13 Aug 2021 08:13:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfM257l5+9wIsR8dXBsoe5sojHd2LrZ5pgvv+fRtXql4F385DbeUURtP+QspVw++fsVQlr X-Received: by 2002:a50:aa87:: with SMTP id q7mr954238edc.157.1628867594797; Fri, 13 Aug 2021 08:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867594; cv=none; d=google.com; s=arc-20160816; b=VLx22xVNZu51YwI8PVDmV2hrABLTZXDnk/dUFcqfGvkYd5yZs39PTkX7HAGIaLXpVi jhasWd7nwg+i3Ysd4Tyo6x6WdyyYliji8+iUanoqnW0XvipL6P0IGTPoU3flsbcGnf9G aVfkQOHxTmnWrdG5FH01Wx2yFS3sOh6aCp1rQsfKLkxirgy9vPO27dQqXxM52ofMCNei vNrLjir3UQnnG5MPrNea5WH606NN3a/LPKygaf+VlllnKyplrGqL60Cw6nmr7LktuNq6 YMoedkvWI/ESo8TXo8l7juqKQ4rIrJY73bvFiquMch8JGcNXE6IRgH7CMRrzGJ0sYZGA VJ2A== 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=5IrlHxtTMlZuPBDNljIZmvsPi/K1D7SSD2vD2C4OXck=; b=blnv/lBG+HNvXONi9DOF7TOjYDaRkeuhHCmO9Z0xQRFwQOKtODYBX2dVfAHMvMnImc phfOEF/6qKrcd/ggSx1B9AaNgA4UGVarayAU3dH/a7Z+9kvnpnY71bv/y3nhzjRRblul 4NNaPAttPD7w7CA+tlPnUF4w5vBF9SrA3wv5hsfzZayb3lOb3jDSYfMwpKQP8uZHHbif EUYUE90iFjUZUMYYt0aO5iLoGPS54jMpx2ki647bSsRJo6s8s1vPptdfJnfdOpXCHXtE /3BbiM42HlGRXA5ONaAwq7vQIut6FTy3OUjFVbl3NU6040s9B0zf8lOirsHi7Jp8lU00 D+mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vSKdWce/"; 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 ot21si1929043ejb.414.2021.08.13.08.12.47; Fri, 13 Aug 2021 08:13:14 -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="vSKdWce/"; 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 S241687AbhHMPKy (ORCPT + 99 others); Fri, 13 Aug 2021 11:10:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:53720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241652AbhHMPKY (ORCPT ); Fri, 13 Aug 2021 11:10:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D40266113B; Fri, 13 Aug 2021 15:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867396; bh=8Kq8PJidGV/fZmYd7B9fuwje5htBYajQc3q9hhqLjMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vSKdWce/H+Zqvv0VGDbMBngzyHavyJc/YQrk/5iZ1O69l0JcGrYGoR0bukfZ0Wm6l XzCdukxaJ4NaujFG73C/vO4Ah2we8xmXiLG0I9cmFKIPfSaJ/ikqea3kq6xECWpyDR bk6kJMq8xwfLBXRVzrZo+i330ERBfcj2vnz0mEn8= 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 4.9 06/30] bnx2x: fix an error code in bnx2x_nic_load() Date: Fri, 13 Aug 2021 17:06:34 +0200 Message-Id: <20210813150522.652304555@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150522.445553924@linuxfoundation.org> References: <20210813150522.445553924@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 46a7dcf2ff4a..9d7f491931ce 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2672,7 +2672,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