Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3755762pxt; Tue, 10 Aug 2021 10:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeUG7qXoY6FnsFrqlj7TRFiOIpfp0Jvt2m5l1ZzgLz69D8gLOymM6WLfUy/7lZB7PRZ4AL X-Received: by 2002:a05:6402:2067:: with SMTP id bd7mr2057475edb.176.1628616842703; Tue, 10 Aug 2021 10:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628616842; cv=none; d=google.com; s=arc-20160816; b=rkUv5aLWwBBA370/ygU56nb1cMrhyKg4L7pMIaDAVyatwNeexT71oNIpcCrvPifzXs UDU02GzcSj9fBe9/nbc+rvUMbbgk6XewS/MAMEjHZ6bRn0Qxp/N9bUw8rDTo5Rxdh98W p9QY9WbxWywUPNqHm5ezCrjYvt2RWzMuBA93KrwJwhM82dg9JG5jAGPkJbgeGROMylnE V0KYOqxCliPHXJhR4n+qJiVASqY46QyvAI+0wiPDgRt27UKHkDDBaFGAZcD+rhI1xCEl FHV9san91BqvL5zHOcVAtzvcpB48jHVJF37fyvUCxTzCQXyQJ+j7P1hMqRkfYfYG4ouj p65w== 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=YjmF/KNgZuMhZmnGQwx95qMoBkp1OFuMDpZDkNkLs9s=; b=Yv4XnlObPQxFMlMDz9ZC9N5yedsj8G9Y1fjX94m3/faD5Ug4uMh48pvZsGIDM7SeJ0 9qMzSouQt76jMrKlWB0ug+/1iWFEPW/YfbaCBnmLJTX/qNsXr+sUvgC5O8fQ20NOwsVE Q4wQkTDfF8QwF3IxXejv2cOtCRkfjIoECDNevznowiEcdJ9ZqlOQtz5ufNTyIpo3yeg5 /NuoOjF9f/TPm8GuFbF2LmOb40tqL7B0CngYhWXpcEm9MsIo3pYHhFH8Ve7aL+SUPLnL qovd6+153l+izKfh998TqP7XYns+6pj03kFwltVBPUFMj9YSZOA59vV6m6JO22VPi47r vwYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="P3CAhA/2"; 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 p5si18436987ejz.96.2021.08.10.10.33.38; Tue, 10 Aug 2021 10:34:02 -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="P3CAhA/2"; 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 S231158AbhHJRcX (ORCPT + 99 others); Tue, 10 Aug 2021 13:32:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:59830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbhHJRcQ (ORCPT ); Tue, 10 Aug 2021 13:32:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CFDEE61052; Tue, 10 Aug 2021 17:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616714; bh=FYT/3Ix4m4ywqlYlcQHDsUk7ihSW3PR4wiskT1f4rP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P3CAhA/2olhPnDT8H6Ynn83XSwJ7SvrzYiVyim/uy3VmYkHhN4Juc5Xoy1fcqeNim XETzFVlTFG/4/JSGylQfPHbK/O8aWI1wK0kYs9rs8EkeiK3kWmoZXxLaT0RnV1qK32 6BTIOg8s3A5EytqaNLXeEwya8lUvthFHp2s+gk2k= 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.19 15/54] bnx2x: fix an error code in bnx2x_nic_load() Date: Tue, 10 Aug 2021 19:30:09 +0200 Message-Id: <20210810172944.686394419@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@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 cf01e73d1bcc..2610acf9ac36 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2668,7 +2668,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