Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2677517pxj; Mon, 31 May 2021 08:03:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylUIr/tp5obRyD2iyzbXfFplIpwdqdrdknWz8o4uUEFMrGwChP7MAUOwIGMopJMmKlgVpw X-Received: by 2002:a92:2a09:: with SMTP id r9mr18172337ile.300.1622473422398; Mon, 31 May 2021 08:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622473422; cv=none; d=google.com; s=arc-20160816; b=Y2bBP3scIK18XmeThwrhuVl1RR38LC2vk8KZGh3SEF2csOSdFVUXAvNrtCZE/ustuo c6FgAhSV1MyshfHtXyGwmROAUrJnUeI8AqMJB5okul1EHhTA87CVilyvnTDYOa5OlbzC aP9YluTD8nDWS6aeS41C4xGLDsqujaO55yojnD68py6GQIlz7d8D1GobwTyKNNpeNug5 eds/aiKTV7Zc8vXJoas9fRlGmroO5SYx7slZcbfvnapbgCOjKyWOEYMt75DMoRNFlq0D ZzT8ngmLuogqhabSX0e9IKY+FRhR+6tf1TPCcsMbOa+Tlti23J3eWVL+DhJxyvnjszgM GocA== 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=FUrKJxa8hGpEc720NQXRvl96O3oHU6s80Cvp1/XhSug=; b=jKuFd84Nm4rLGAVd7bCh6MUSPdxZ7wSNeYOgi1C/LyOL+z66CehGSgfWGcFTjjCr1A eewEG4mWORGkHrrwlG+3O06sAmlgKJRd6xV6H0YtZJaoWIAKVYaTljp01zTvFn0q3rUu O+wlqofxz5tkcmx2/M83lgo+e8q/H3ZSqwGxh01jJCCYI1stbp76FCrjbdBIWmObxhA9 eAeXpP4tW4byEUKbiwTVs//DfTH0hPUA/F8S1ERnMrN6dJrbP3kMPXByk1cC+xQCx70p CsH57pxvjOSgAmkwqfTbuZrgCE/UkgtnqST18NYUHrhY1+I9cleVLDi1z87njABxaW47 YHkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ri61Rxph; 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 c1si385094ilm.49.2021.05.31.08.03.28; Mon, 31 May 2021 08:03:42 -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=ri61Rxph; 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 S232615AbhEaPEA (ORCPT + 99 others); Mon, 31 May 2021 11:04:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:40090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233101AbhEaOHD (ORCPT ); Mon, 31 May 2021 10:07:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 48951613AD; Mon, 31 May 2021 13:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468353; bh=DQknK+guMV8EB2YI3n8n9bEN8CPrQG+Hf0znxpFfcVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ri61RxphaYGF1yNHZ/VD0Y5WH+SrpgDGvI69qVDVIiDVvF+DWsJJkf9lBZ0GNWTTN qpQYbZnShaSAU/pKD20ThbhrpZXvLPLoYFlCDQ4XfXU5fJJ9B8meL4Tv0GJppNG5t+ TJuUj96pmbIGe05S73CS985zcMGCI0skKlQJflXg= 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.10 211/252] net: bnx2: Fix error return code in bnx2_init_board() Date: Mon, 31 May 2021 15:14:36 +0200 Message-Id: <20210531130705.188298167@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 3e8a179f39db..633b10389653 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8247,9 +8247,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