Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2122341ioo; Mon, 23 May 2022 10:32:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLeX6YEarHfwO3I3F/nJn5jrlvPMjd5Pks6vYtfJIsQHpx+Eko+1Ao//EGqdwJ562UlpXM X-Received: by 2002:a17:902:ed42:b0:161:6643:419d with SMTP id y2-20020a170902ed4200b001616643419dmr24554493plb.58.1653327136978; Mon, 23 May 2022 10:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327136; cv=none; d=google.com; s=arc-20160816; b=EpDUSITld1BgshLuwNmwtrrOcne0NVpI4h3cvb5i2HKs89ny/G9kEqyuO6xGC8NTc4 faZ0kl23OkHy41OMhxxbERgXKadcYGw6MYoBtzFFJg6YEvPj29Qb212YeeBjXFgVD5pb 2RCdpIxoMVBwDO71RyelTXIjQ8uWgrkxy5rMz7CEIEZNcmud22U1WzhlUODhVYymyUAI 6eNwYChbvyNqEDfrleOcQioiJLBy43CxMq7KRfdqKCAwGszfyC6kGGQm7lPzQ4Gem4Tl VuQ7gJZo+o1q2H7+fCLBUJjcKWWfa7dXFY7aNusBHczF+mNr3pRjA6a1/2Thbb34+lj+ 5PPg== 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=Q2YrZ8Qv9Q8FffdgXfd/452gkVOZXmTv/9YDTb0zc9s=; b=jmWuvYpVUSqQNVF9i/tqDnAwjE9ldlEhKWbmkc5leM0PmhMQbx8FEz19h9II/ftfms LShOuUBSUPQd3zP2AdgSfay5/g8ECLibc3F2uwj9Gucu2MNsrxsyfjl14JjZmJWEdm8y UoX35XCaeTh8Owk9Ds6hTekZbeO6Dm7diypBFsseLU5e2vmUc8fPTFI08WnKtFOy9rqK xqdB/LMeb6+c7kNTP11kMwUYq3Kt60BkELtbsKwZfW8Z7+XwkEQzA3xfzHFz9wgf9xHC L95eRbQ/0ePFuBKNMFkPzrJMYbrw8QR4QT0YNpFFCoX3S8uejgCCjsf3Qwa01TgGJ93k yn1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wP8DzkCk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 23-20020a630017000000b003fa4f57122dsi5250680pga.773.2022.05.23.10.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:32:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wP8DzkCk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7E9B391591; Mon, 23 May 2022 10:30:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241100AbiEWR0S (ORCPT + 99 others); Mon, 23 May 2022 13:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240497AbiEWRQX (ORCPT ); Mon, 23 May 2022 13:16:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006F670905; Mon, 23 May 2022 10:14:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 28CB7614EB; Mon, 23 May 2022 17:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E9DFC385A9; Mon, 23 May 2022 17:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325982; bh=U3MCaPU4KcqqPQx9TyAhzv+aeX5+rNSIakb60lLPjGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wP8DzkCkWTJ6gOeU2FoUzycrAYAgMuyqlXetZbMqbIBfiWdwKDa0kUI2mzUVtU4x8 k2lIgUnK4U/jlx15Dd/AxaouVTdEQEovh1BO+Ur5uHrHEWm9dftRam+W5g9lmuqEBa LD4rJP/1izq3657Kh61xaPS91nWGJqxTF6RuSFDE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 40/44] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Date: Mon, 23 May 2022 19:05:24 +0200 Message-Id: <20220523165800.666405391@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165752.797318097@linuxfoundation.org> References: <20220523165752.797318097@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit 0807ce0b010418a191e0e4009803b2d74c3245d5 ] Switch to using pcim_enable_device() to avoid missing pci_disable_device(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220510031316.1780409-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index cc1e887e47b5..3dec109251ad 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -261,7 +261,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev, return -ENOMEM; /* Enable pci device */ - ret = pci_enable_device(pdev); + ret = pcim_enable_device(pdev); if (ret) { dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", __func__); @@ -313,8 +313,6 @@ static void stmmac_pci_remove(struct pci_dev *pdev) pcim_iounmap_regions(pdev, BIT(i)); break; } - - pci_disable_device(pdev); } static int __maybe_unused stmmac_pci_suspend(struct device *dev) -- 2.35.1