Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2626989pxj; Mon, 31 May 2021 06:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGOu3LeFSmyU96D+MnctIWskdodbKvvYQ0mKgSJlEO/ndhJDU4mvORi645H8mGx1F0rLtX X-Received: by 2002:a02:900b:: with SMTP id w11mr20820195jaf.5.1622469261249; Mon, 31 May 2021 06:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622469261; cv=none; d=google.com; s=arc-20160816; b=zq4RYqDgOuFNPpIBUvFvkIifLdqICsKGrQNT9h5LEvwBZItS4YmIfI3e3vw6xDWDJ9 ZRoiiMQSA57z5oK/qKjBzWE6lTXovgEKinc8TRfIqfgxM4WDu0qH9fhpGMCn5//xIZZJ jQkvGYE8cALPPn+Hqui+kAXppbiy5+lKjfOu5ll9OE/e6a6L1bK09U/tb4Rx7f/Mlv3G O85Nw1ezKPuW2kGLcaSrKlzaBQBNN6dUFhPUeXdOLdrn26RW6nS53PAnSIeqYfAj7hg/ Vu3uMJ3D/UzEgBD+l2IiIMxooB872NU1KWhh+78L66j1mAN+ShFHFWILoCdsl8JumkOB YFUQ== 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=Qz9pOf67nKtadivja2d6MDB3zFqlJHBHlnMG2q1yEz0=; b=btsyYW1eGyq3PwQkYU3NXJ3XowRfxPGyZNJ7e5QLUOYllVIwBKVS9JaLdfainleehG qmAYLlNr4MoVHmhgOUAE79oqSLXSeBhZc2X8SCXAW4cx3PPi5wPpp37X+TSWlTSByzMs msklmrs3XP/6OEAMIONC69BcPbtAMiLYFP7J2S2dvE5D0llFEpefrZAAAMIL3E/yC+fi 1ntS+5UNCaihFbJZ+fBeSvLW3uUpMfyeAgH2lSfFG3U4cWYmm4KUCkCE0RXaU4a6n0G3 zIHvGAr3X/lIoAbPNR02Zj7VuazvIwZpWHiKVI06H2cxnWyJFuJXqCaQEn/1kDvEG4fU YaZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hqRsmYGs; 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 r84si14902998jac.11.2021.05.31.06.54.08; Mon, 31 May 2021 06:54:21 -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=hqRsmYGs; 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 S232366AbhEaNx3 (ORCPT + 99 others); Mon, 31 May 2021 09:53:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231803AbhEaNf4 (ORCPT ); Mon, 31 May 2021 09:35:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DC7D613AB; Mon, 31 May 2021 13:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467539; bh=AqPSNXmqpkBuzKNdGEkl44YQeFHwWt4dlcI5cmmDdjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqRsmYGsoiIUT7s3+tQzZ0TZqrLsbSAbWdS/bo3egu7+5tiRbyy5uedKtrIa40orN Pud9cBsXYp6hfwA7/JG87MBp+6x01E2ORQB1J50F55n6tIW8zCvO5NQTxXdFQJgk04 pfFvYVxtNNhNGo0AlqNAm9AvaotqxKfFAYipHHJE= 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.19 102/116] net: bnx2: Fix error return code in bnx2_init_board() Date: Mon, 31 May 2021 15:14:38 +0200 Message-Id: <20210531130643.584295963@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130640.131924542@linuxfoundation.org> References: <20210531130640.131924542@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 122fdb80a789..9993f1162ac6 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8253,9 +8253,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