Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp959120pxb; Fri, 13 Aug 2021 10:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVvC0OU5kIFUrinwxAuv5QL6aNXlWqYPpEje1rasPkK9i65mEvE10Qd8rwL5eSot6y4nwq X-Received: by 2002:a05:6638:33a2:: with SMTP id h34mr3175025jav.43.1628874269298; Fri, 13 Aug 2021 10:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628874269; cv=none; d=google.com; s=arc-20160816; b=iIF0ZXqr9FtEORKKOdH9IayYltWWFXmTKHMAbwfEYjwff1i5t2omLgJZY3aR1LaFtk d/0aC0WVkVYD1n2LoZu+RBK7TJsW0wNdfM0/+UfCd4zQVH5sXXLzOV61qsq/fXfnufVR DGu5KuHfUD3nbQXZR1u8t22+XRpdMW95ZdMW3080dGspXm3V2EOFI7Ltbmi5rLFjJrNo 4hN2o1p/1sx3JVbNQT7oivq0njy6MlGttdINRP6S9238tXoPWDyxap1V7yqDroFaqcc2 QDXWtoRewyOzIXAK+IYbkeQ6ThuDnNu1hex0pHwStsvvS8eiy14X/ta+0So1W5RepBdL E2bw== 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=VwRChFPxWuyrX45CPSRZH00pruiIzXBmSTOgccAQvcc=; b=ZUF8r5zMHDE1Ro4GEA91fzhFKGkGbimzQ+UnKcgXenfG6qQWpsWUTgcK9qZyBmSil/ 5HZZGayinkpaQZYTTBtCkxpKI1Ok0ICsLB4UfPlOdiPURMfAvv+Zdiosr+GvkSjKU/Qe 943pwEpWNIaVe2AA6MOWikPfrr5vA/J/LN04fdQFquZqF91GTa4o4CuxrtV9AAoqeH6u wNcwpFRufckHfxeSp2PcSRBs2QlAIac7HtcuavmLeUWYiM02bol4o/xPd5c81wEmOb7e AOgQBu5z2cb/Uss4kKGwCCZ3YaHA5UD83ZFbOqQtnAsom2N66Vy+luNo5hORYbDaYmQb rA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WGjS33GW; 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 m2si2219341ili.39.2021.08.13.10.04.18; Fri, 13 Aug 2021 10:04:29 -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=WGjS33GW; 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 S241238AbhHMPJN (ORCPT + 99 others); Fri, 13 Aug 2021 11:09:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:51746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241335AbhHMPJL (ORCPT ); Fri, 13 Aug 2021 11:09:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B8496109D; Fri, 13 Aug 2021 15:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867324; bh=UoNPOE7atXK52BBeJn5clIN19MAL4kX6OhMsQIKO6s8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WGjS33GWWZZD2NLwWtHitK0Sqjuvkv1Rc/0zgHcGZXXtPMQiaOVAy5I0FUTsyq/n3 rNOvsgBWrfhz7VCZi6ZMZb8Hn+e/uTbOGvNX390t5edh3ERWFDUrNSBQ19DGwYGH84 HoVsN6EKRDTll1sxIQW7pUpJz44eoho0lkWvbe/4= 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.4 06/25] bnx2x: fix an error code in bnx2x_nic_load() Date: Fri, 13 Aug 2021 17:06:30 +0200 Message-Id: <20210813150520.937607195@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150520.718161915@linuxfoundation.org> References: <20210813150520.718161915@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 13de5ce3facf..dad830ee9d5b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2690,7 +2690,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