From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05617C49EA1 for ; Wed, 7 Aug 2024 02:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ffDHoE21UFrijGdJEWSZI39oOBTMlWPLsrBKXErtj70=; b=OP/zG5f4hACyg2pca6PKTB9T4u ZHtSPPf1PSIih1RizrtiLi+nVZGDO1UnGxAoq/2RI6Jk9GNMw+PawnnCw4ziJ/bH8dnwVOBCFY5dl kCg3T2XXfgE8EdBw1lDyi8/sPMSsymtcZ8on6rUchg4enJt0s4V4xPj5H6O6Ie8JgFYNRcYDdOBFf Fz0Xxk5aYA8cT4jX6FEWUL86C1qaM7RchdP8tcPOVaL2g8h9sYvauSZG/Uakirq+Bty6mV7V/TRp+ PdHAYwqUZFm/nxPKmZuUtylzIKMCmXMsLHTgO8yT+PL4u7VaS9KwbZUmoX4qU7Uz6dsP+sSihdvpt AJ7y3rrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbWXQ-00000003dKW-0vOH; Wed, 07 Aug 2024 02:36:32 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbWWr-00000003dDr-315n for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 02:35:59 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-76cb5b6b3e4so929510a12.1 for ; Tue, 06 Aug 2024 19:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722998156; x=1723602956; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ffDHoE21UFrijGdJEWSZI39oOBTMlWPLsrBKXErtj70=; b=pukxRSS992DzCzmiHsyqPe6qfAxI66XVzn/LQ1/BEXQHFprOAnx9OXGLa1KBHiz/rE qFow2fh5tdRQ1X0db3htzyQj1sfDbtEifkVKLkQCAhEium8Dlmv8sBVyUzRVzvDxgUqu L7//9CeKjnAnp5Ua2sJb/uKqirio85nwwAr6foB+WPWhQGs28jVb9GdhiI5xcKohEEXa nBfXG3g6xc62DPgLUfyTJeNNCOizmdwx7aOBndcuryqWjPWhtj6HXP4kgYhlZYN5L0E0 tFfiG0AopjxBVFLbDU9OCGHpBBV0iGnemDjs7Pb2CKGcbwaUJ95/wVDWQhBFH3teWMjI sAkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722998156; x=1723602956; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ffDHoE21UFrijGdJEWSZI39oOBTMlWPLsrBKXErtj70=; b=kiqiuGAxOJrCG+3zERNkkU7Umu9qfchdfqEzqfiHi+gxJ537JeGkk31pwMgv63xwTy 3WZpH3/f28dzmXQK6LwovPyTR65uQGoqZJm9Ser8rEee3levRKsEbp7gsbyOyJupzrKu qJyOC5S5WIrQ2fEjHmpEYLxOWazw70o6Jz66IsZXAlNp0D0gv3wLyvCpgdLN78EvRwzI 0+19/zB1oN1GDUU9P6fjzbvYEY4t7P0+UQiUlFNecM6aPPSw6yp1C/3ClKdF9/qd52ix Gosp3S8fYw0yjNZzLFDTDJWE2TCq5jvVzd3VwXRDRbuM+iv4t0RC+aUN9Ns5aw3aXnv7 MDeQ== X-Forwarded-Encrypted: i=1; AJvYcCXvCYcoS1JJ+DTWbRsgN/P4c11CptoVWCqBiKkvzzwvKCbAsh0wkdVACjOQjKUo+ZJkadQe7vp34g3iEdFiqZubBDeMcH/5SdpogXlSD3brdABfQZQ= X-Gm-Message-State: AOJu0Yzx19qWRJ4Qx8W4my9Ru/yT3dtp8Kn4akaK9woOxMMihclJf6OE i7YyiSXB9E3BBi+7aah94O6MLx+NQ/UUGKNO7viNNbq5shsmrb3GJWnp3LKG1w== X-Google-Smtp-Source: AGHT+IH2vKn4nPpW0Jtb/0WJkJAh5kcwt2+tJwY3MLnvhTrlyX71WfH1rzax1jCG900cy7Zo2E1Kyg== X-Received: by 2002:a05:6a21:3944:b0:1c0:f33e:aaec with SMTP id adf61e73a8af0-1c69964b680mr18265769637.49.1722998155703; Tue, 06 Aug 2024 19:35:55 -0700 (PDT) Received: from thinkpad ([120.60.72.69]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec43944sm7532346b3a.75.2024.08.06.19.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 19:35:55 -0700 (PDT) Date: Wed, 7 Aug 2024 08:05:44 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , Conor Dooley , linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v8 03/11] PCI: imx6: Fix missing call to phy_power_off() in error handling Message-ID: <20240807023544.GB3412@thinkpad> References: <20240729-pci2_upstream-v8-0-b68ee5ef2b4d@nxp.com> <20240729-pci2_upstream-v8-3-b68ee5ef2b4d@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240729-pci2_upstream-v8-3-b68ee5ef2b4d@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_193557_946236_2DB34DE6 X-CRM114-Status: GOOD ( 18.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 29, 2024 at 04:18:10PM -0400, Frank Li wrote: > Fix missing call to phy_power_off() in the error path of > imx6_pcie_host_init(). Remove unnecessary check for imx6_pcie->phy as the > PHY API already handles NULL pointers. > > Fixes: cbcf8722b523 ("phy: freescale: imx8m-pcie: Fix the wrong order of phy_init() and phy_power_on()") > Signed-off-by: Frank Li Reviewed-by: Manivannan Sadhasivam - Mani > --- > drivers/pci/controller/dwc/pci-imx6.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 3b739aa7c5166..eaec471c46234 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -953,7 +953,7 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp) > ret = phy_power_on(imx6_pcie->phy); > if (ret) { > dev_err(dev, "waiting for PHY ready timeout!\n"); > - goto err_phy_off; > + goto err_phy_exit; > } > } > > @@ -968,8 +968,9 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp) > return 0; > > err_phy_off: > - if (imx6_pcie->phy) > - phy_exit(imx6_pcie->phy); > + phy_power_off(imx6_pcie->phy); > +err_phy_exit: > + phy_exit(imx6_pcie->phy); > err_clk_disable: > imx6_pcie_clk_disable(imx6_pcie); > err_reg_disable: > > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்