Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2123924ioo; Mon, 23 May 2022 10:34:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn1VXbS09SCpv18pHCtmeQEjSM9HvNJjKsk+1HtnEj+33ldldQsATu3V4Yzi10j9NmP/Fr X-Received: by 2002:a17:902:868b:b0:161:f0ac:875f with SMTP id g11-20020a170902868b00b00161f0ac875fmr17994071plo.83.1653327274042; Mon, 23 May 2022 10:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327274; cv=none; d=google.com; s=arc-20160816; b=smVYs7352yZ5BnVp3a88iyaSFigDhdUxMjRCleoOu14nRpcqO8V2VapcPkKflP/FxS salnbp+Jxuu6MZLI7foltgln3JFZpeweiDotojxNxpIEbicp9R7BTzqU2VVA26RL8q2N Ny1MZfbwMHEfrsiCKueuWcKENegq6RavUOVdZCaMYVQBZym9HSuaUC+uV+FnkOYbI5WC Yqbw4KKdAyei0WXGMHqAHqz/2WUUifE4RN74AnHZ1ugMRTRCDIVJrZjwQx7lcl/ig1Pr nOu9m+Eae3a28PZ5Jtmv9MCS5RfpUc4TWhyqPyj20w1PukqaNMLJm/2U2CHzGiCL+w3x 678g== 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=P/2FFR/AozyZRgnvI0WUANKCaBrkcqPX02MqQJZD8YI=; b=x1YT3dri9nBOasTKAhB/d0M4FVTtMFbuoKGsGbDtedW47m9+xjP9Ir5wtnLvW4F/Rj eVP8pXbQ9QWj+Xk91wkd5rQMm8mSiaFnCP2HlRShdG1pfK2WllAl9CaC5KBuS3apCBKh km9CVJQDNVvXDib1tSCa1qc3TcZDEZ5WuEha8L5cP/n/h6nJNPBUJE6OsmBv5yWEKcD+ 7Yr12u8J3bYNI/iA4EC8BXHvv18v0ekihFsel58paJDUcv7874Snuqc8zpnjt9E7Uqh6 f9A20Lqq22NsvtCAI0+JMqZ7BI7gSwB4QEGu2xaAi6aLWdVFE+SRRtsC1N4+n86txerX BbfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CxdAGLIs; 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 me1-20020a17090b17c100b001d5cd19a41esi11279827pjb.38.2022.05.23.10.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:34:34 -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=CxdAGLIs; 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 B8F79712C6; Mon, 23 May 2022 10:32:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240922AbiEWR3T (ORCPT + 99 others); Mon, 23 May 2022 13:29:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240764AbiEWRVh (ORCPT ); Mon, 23 May 2022 13:21:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C20D74DEB; Mon, 23 May 2022 10:18:02 -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 651F46090C; Mon, 23 May 2022 17:16:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63D48C385AA; Mon, 23 May 2022 17:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326210; bh=kwurT1hB2Xqs2kuSNcjzhOtEumsB8R6t6q+OA5zR4lI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CxdAGLIsacQeblb61bQM0iJre1wFPMn/6S8jnFSG2TyMhmqU5wzz5oZrHFAfZV2bq NLw4h6npWANu2BI6XgUutSMkSyb3Hm18PjCFMo6A1W9jQMMXdQsf6Vq11YC2KPRNWI YjVpclZP0fu7CBNT4exQsUX9Y9XOqGP87hGP1AJU= 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 5.4 57/68] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Date: Mon, 23 May 2022 19:05:24 +0200 Message-Id: <20220523165811.923079114@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165802.500642349@linuxfoundation.org> References: <20220523165802.500642349@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 292045f4581f..fceb0f9e797f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -481,7 +481,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__); @@ -538,8 +538,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