Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp401271pxu; Tue, 1 Dec 2020 14:19:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqMkJUlrw8eJBSGCpWBGrtygM2SGx8xFKo3eYJUE6iBII52rJJ9dFsCSxLFvQTHZaAWuIX X-Received: by 2002:a05:6402:312c:: with SMTP id dd12mr5260237edb.327.1606861167062; Tue, 01 Dec 2020 14:19:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861167; cv=none; d=google.com; s=arc-20160816; b=1CdvIb5GFoDBtG/doTkHn/cDLxM1+htnxucCPaPATlMGEZVbxcYLZafTdIAdUPuDNs pzlYX2dNgrkJCxdfuikh4hR4752AANuCB3HJngNd5HkLAmf6/bCE2sO1kYBVEjufuZjL KqcwWedN50T16K0sjbJM40xazgAUG/2EEFtEi/aXJZSrazQJZ+fYL+fNbHEslnrWooHT Wn9mqtGSviHP2hkdB4xHpnbpnNuS56wWAgwSlHwvubCOUR0cKHgZdmooSC59E9vkY/qg miRye0JjzbNGpHb341sR70+Q0rmhblalcnM/rZogcEsoHEgR3p9B4c3ynLFa8N/frDFl RUdA== 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=H6IEXFB6mMZZryXgiF4AbOLiZxwpk/lu1yvvGTvEKt8=; b=urtcWhYn8YYcFOfhc0emaN5zIiVBzjPEfTrKQgrrqT+ckvrrIx1TAjC2beq/HYUBwi Fsd2UPI4HzUwzDBac9A/ZolUrFG7NjzmLvhsnMXqvE3MyFBugBWhD3Bcg+IjyYfl4ug4 KbyTV6CUDkjvuA51ZDL78WRVW5d5ERLcyMxHLGETdAxugMmjH1UcXsMR+Rr3YnDGl6bi uHqN3p/duQaUlImE3DQH8nROALEzJPidwLiVj6fBe/ezOqec3aHgyWCVtiy3lkhiSOov EOMaQX7u6f9C5AhkS8Ne71cA+eKB1Q/iEby6hwyjYEBbjgRIOu3KOsOzcVXfQCcljBPy 4Iuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UrKkIuGj; 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 x72si739388ede.132.2020.12.01.14.19.05; Tue, 01 Dec 2020 14:19:27 -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=UrKkIuGj; 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 S2388087AbgLAI7M (ORCPT + 99 others); Tue, 1 Dec 2020 03:59:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:34682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388034AbgLAI65 (ORCPT ); Tue, 1 Dec 2020 03:58:57 -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 DE3A1206D8; Tue, 1 Dec 2020 08:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813096; bh=Eltv4jINqLCplTubDg4TvrQFdmzGRndZ02hic17dWcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UrKkIuGjMSXTgAQWX6XIpm5lYh6HU5A9J+F5uHSCr0UQ+yuZnhPA5tnFNNl0LMVw9 C8xYCrhM/j1Yh/NKS/uIuVYtEHc7lUC+r+gkX4UJj4IGgnJ0ISaeIbq8Tnun5HJwyb voX/eqyNqO5AoEHlAm7xXD2d8n4fkqo18L2FzgAY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Michael Chan , Sasha Levin Subject: [PATCH 4.14 32/50] bnxt_en: Release PCI regions when DMA mask setup fails during probe. Date: Tue, 1 Dec 2020 09:53:31 +0100 Message-Id: <20201201084648.993802795@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084644.803812112@linuxfoundation.org> References: <20201201084644.803812112@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: Michael Chan [ Upstream commit c54bc3ced5106663c2f2b44071800621f505b00e ] Jump to init_err_release to cleanup. bnxt_unmap_bars() will also be called but it will do nothing if the BARs are not mapped yet. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Jakub Kicinski Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1605858271-8209-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 6ed1d7c86cfea..ea2a539e6e0f7 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7213,7 +7213,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev) 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; + goto init_err_release; } pci_set_master(pdev); -- 2.27.0