Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2639640pxj; Mon, 31 May 2021 07:09:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJTSupjZjtqR3zFX5T11NNk/Nqh3eNvA8tBKSTRXp7n1GpUoZVvFyg/DK03N5NeOUS0tAc X-Received: by 2002:a05:6e02:ec5:: with SMTP id i5mr17760709ilk.97.1622470197701; Mon, 31 May 2021 07:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622470197; cv=none; d=google.com; s=arc-20160816; b=WI49qxSPOtRX4xyEZ5pavM6ifdn2Bsng/+OZgl7A6mkgiSrv9PuyN/zLR8YX0O7Q7M m7/oQ25ViwJeo9se9yHAqT1N93RcrGm9+R3eLo9reqtFjTzWAdB2KSdMiTE5JJbBJpNX o4NpXUeL5YmbxMgGCA04QpdKHf1mVHSNNjqhketiO/NTqXS5QDEIyaYbkVYtqrPYEQx1 IfXZAJR8xa20nSiZOO1uBhieo23PJriUujvygdKoy5lm6oh4BeAxhfOlC/bAGtDMK85V p4sycM2pG9MzFgnql+VaFYGtC54gFzD4eb3rlVNrgGw2PmqvKB4DskXmv8xSlel+xf6/ xyvw== 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=M6gxSg4/idwDDaiXHfJpO9PomDcAGfSvwTOTp/OSJGI=; b=c71bWwsO2IMuYmOKBSAumqks3UQ/mJf6R+WxaAQc7o63qNs5UXZiaIrPUfFKwUVpCS 2q6vDMAyKs/B2HUY5eHlWD23dVtbcQ96Zb3GWEH/42ydmsLGrQMRLq/qAgVoxxvDhVU/ tJi2Xg3UFwfFM397tsw/zjGpCy1Azd3K839TZoiCSOekRCATSAMNWnVvmYDhwiJJ89lV 8wBwx+h/hmaGe8IZ0a0qvwYadVaQ0pxjhXC6bJfodXEt+9dA+V0Hw8469YGBZiioCo26 gjETtz36g1IGn1fHWjZGnki/jn1R5ni3Enbxtwxfq4/vwR8Ypv2dma9W583hhJIJQGHW tTug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m4RYgh8F; 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 w13si5976218jao.90.2021.05.31.07.09.44; Mon, 31 May 2021 07:09:57 -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=m4RYgh8F; 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 S232357AbhEaOJ4 (ORCPT + 99 others); Mon, 31 May 2021 10:09:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:48556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232650AbhEaNn6 (ORCPT ); Mon, 31 May 2021 09:43:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9804E6141B; Mon, 31 May 2021 13:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467753; bh=/VB0cNKBXrkiO0qO9uaMW7ltrXMVcezAhAeh1le109A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m4RYgh8FAI/9KvGG8QR9dimYfEFE+MzkOFxYcQUXG1zU0zWnvpybs32XuuHSqFW2c E8KQoFv6n/CI/wMv4xOiWS7c5nVIYQrGQVDokTvjAIRtLe1+f/2heWfvn6agp7FrLa AWQhRx2Hu+KAyN/Fiz/wIAWnm7RGyYEtXWD+9Ek4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 66/79] net: bnx2: Fix error return code in bnx2_init_board() Date: Mon, 31 May 2021 15:14:51 +0200 Message-Id: <20210531130638.104305270@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130636.002722319@linuxfoundation.org> References: <20210531130636.002722319@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: Zhen Lei [ Upstream commit 28c66b6da4087b8cfe81c2ec0a46eb6116dafda9 ] Fix to return -EPERM from the error handling case instead of 0, as done elsewhere in this function. Fixes: b6016b767397 ("[BNX2]: New Broadcom gigabit network driver.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index e3af1f3cb61f..299cefe6f94b 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8252,9 +8252,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) BNX2_WR(bp, PCI_COMMAND, reg); } else if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1) && !(bp->flags & BNX2_FLAG_PCIX)) { - dev_err(&pdev->dev, "5706 A1 can only be used in a PCIX bus, aborting\n"); + rc = -EPERM; goto err_out_unmap; } -- 2.30.2