Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2711355pxj; Mon, 31 May 2021 08:50:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP3ErRiFWm9rwhyqemfrrij0R7abk/63N1Yw1PRSh8tNLuSCNVTj6qEfvCcwWu1mmDIBIs X-Received: by 2002:a17:906:f8d0:: with SMTP id lh16mr15092752ejb.331.1622476245362; Mon, 31 May 2021 08:50:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622476245; cv=none; d=google.com; s=arc-20160816; b=BTriV6g6MmhBgYFkTl7S1cWAdybiafwL6szr9j8ojEsRpFgwkhmW7RaWpBcw4kxxf1 5AGCTXyoB+Mm3ArXphIj8oszGf8GUqseP89KcOASAs3NOvfF8B+zK3Eoq7WNXyjp6f/X qGIqIDALLHPiZPN/p8oZ4R/jlNsDFI1Mz2VJyHZk92foPv5wj35jaZtCpKTSh07tsiWw AJt/e0RmazZfdJB/g61DVItyeN6+lzZPC64kyztFztWYGTaxKm8M2miSy/LhIrQJSeXL Ku7wsyw4y9X8GU2QP29iCDkCFurn355yn1cT/8tP11Jgch8/cKeKtpZdN25dgsOrB2PI 6XJw== 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=rcQwYT01fjxJCu9M+jgku7AwtbmCkILb9irj2CJacfA=; b=RJVEGOMHvSASq3F7UZKckDrzZ7xnO1xicCdz9WYyfqrW/idnjWnrEyQX6FZnzgk827 fINb1tFZumHkX/Jw/g9YmCFIjRngDm/xMAYXOt4S5uzO0PWjNTJxjREPXyIPorHrV6M5 wiGKfUDbpwB2sMIc52pOpLOaKzganEpGLhEQPsHGeVSlhA1rY7fV0uHrwWQMZ6/YgUq9 zUw61nNuOrnuyVJz0FDq155GhltFHX/RN7XmfwmxYEUsWnDMvV/5xTSjetQIVyX20Gum A3eIa2JGP3c6z3n1eIygKLdYOxAHY5dJqGgYp4bG1X8pTHyPbBR6I9HSJbvF24pA4sgo BXLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JP3aN30D; 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 bi9si12646022ejb.535.2021.05.31.08.50.22; Mon, 31 May 2021 08:50:45 -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=JP3aN30D; 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 S232880AbhEaPup (ORCPT + 99 others); Mon, 31 May 2021 11:50:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:56028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233152AbhEaO1U (ORCPT ); Mon, 31 May 2021 10:27:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 15A2D61C1E; Mon, 31 May 2021 13:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468842; bh=9K4knyuZRMVs006sgoDZrkFeKyJ2moadM/OTsLB6EtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JP3aN30DoQbbutnXOhUQZB5KrtvBEhGliNRbD4B7oe3UlJIhNdXFUB/Gljb5YAnD/ Umj8V1Igof0JsYBLrlmlupLRVl5POG4NYIB8PBzjzGf1ufS5FuGJxJyQzOyZ612LGe 8BMcz/nSjl5eMy2x21r48S8PKkI4B+rXqt+o561Y= 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 5.4 149/177] net: bnx2: Fix error return code in bnx2_init_board() Date: Mon, 31 May 2021 15:15:06 +0200 Message-Id: <20210531130653.080249605@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@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 fbc196b480b6..c3f67d8e1093 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8249,9 +8249,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