Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp403806pxu; Tue, 1 Dec 2020 14:23:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJypEOviTA9DwZSOrkhrJ0+z9NRW598aGlEeGhjUnfLRigjucLE+rwnvuUXUbnGvMnxaHXNr X-Received: by 2002:aa7:dbc3:: with SMTP id v3mr5477781edt.199.1606861422905; Tue, 01 Dec 2020 14:23:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861422; cv=none; d=google.com; s=arc-20160816; b=02rhoBUjb15/nV15hMhxA4JRU+t4+aOsNXOzXx04vYoNfAG9fZhe3jkwNLiBn3D15U FMqQekv1KFq8KM8t82w1IRencW5q0S+AT2JTOZNe5rL4Hx4dmtr6f8MWjXsf6+DvOmLE DIjDi74CngIIfstCWQJHgZZn6RZhql2vtikjkybACDc+85ndCgCSl/0eq6SyGcIxZ+OL 0GtOyLuV4Np0nkerYsDG9K130wtnCaeeSzU59MuR4wJlp6ue9/fJkcb81xeJ7p0yUAb3 OFT4IGUnIuTwFL5V+iLbi7JzYJccvOuvEcVBUJzy+BXQWr9bAMIKwgZUMbYda0Ir32Ex oa0Q== 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=kOr5JoMXCiRtw0huE+nsPDoVuy/hqnMiYk+Q8tonwOA=; b=yThUEhIfPhrepFaAfO8oWH25hcFOVvcwlXIMrQp8wSjRgJXuugDTUdyAscUMd9GkVs 91K9J2JwwBT4P3DjNoWIkrQv7Sj0FD/hJpJfPrJU3GJ4cTvkQMTD/ac2Sc7qExFKxrV1 Fa15tDGiEateSFewC1x6iIXPXE1Oq2+YeCEG4YKW4qIbj6wkJxEWAimavl34id90TqdK Xf8gtzEVbrKuvJgiI0DFH7JXCa0WZMTIVj1oybBBMiOa9/V+Y+x1roa6sWI7v/DxVft8 Z/NgiGIugH5fF8nV5zxwqtp2dUgZFvsxKMJ+iXH7R660kjeeYCeUTYyEg+uPvxk1n24g qnpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uUzPSQHI; 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 eb10si795912ejc.405.2020.12.01.14.23.20; Tue, 01 Dec 2020 14:23:42 -0800 (PST) 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=uUzPSQHI; 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 S2389135AbgLAJHd (ORCPT + 99 others); Tue, 1 Dec 2020 04:07:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:42290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389060AbgLAJFO (ORCPT ); Tue, 1 Dec 2020 04:05:14 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2D3F20809; Tue, 1 Dec 2020 09:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813474; bh=Ws4JrFG7hmAkKWrYn6GrNTih35HVAgdhMO+gshlUH3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uUzPSQHIgbY6iCXBF32FEXyG/ayznJqDp1bM9PHQpBEyWbdeiNecdwa4xr+vcFoJS 1h/CDZmDtWxZtYt/XIPEgJDEhLv3yAVbIgUM4vnyVDF6tKODjoJw+L3Krzl8w5UNzR 1PBUCOyJ3xbatYzhbWw5a3uAvT3dpGCTZ0qFhA5E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Changzhong , Edwin Peer , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 51/98] bnxt_en: fix error return code in bnxt_init_board() Date: Tue, 1 Dec 2020 09:53:28 +0100 Message-Id: <20201201084657.598677811@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084652.827177826@linuxfoundation.org> References: <20201201084652.827177826@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: Zhang Changzhong [ Upstream commit 3383176efc0fb0c0900a191026468a58668b4214 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Edwin Peer Link: https://lore.kernel.org/r/1605792621-6268-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 4869cda460dad..d8e1d7a9196cd 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -10826,6 +10826,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev) if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) != 0 && dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) != 0) { dev_err(&pdev->dev, "System does not support DMA, aborting\n"); + rc = -EIO; goto init_err_disable; } -- 2.27.0