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 80C0DCF9C5C for ; Fri, 20 Sep 2024 23:19:55 +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-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=KOvL1EA6qXJa/Sd2QaEJazo84CX7KHeSt8iifVJskFc=; b=hwIqDi77nZj8c7 fMA0uqac+lPyxS82+9so+1uTayt3kOyQQXj6J/cd6AkrcWiOKYp8IUChYiK7tZtm4TxgdFSJxZdI7 hYmyKl+WDVOxRIfRx64t2nmDAO3E1smq+oDkzNdYXZM7hWScDqUglirkHyhuUET13vNxbSlaBQKKE +Cf9QbdpIdxzK/u0pyL4dEw+1KWeNax3lFEOv3NZitIGE66JlnGcLWaXcdky8/pLXMo6K/5c3Qs3W u+C5+9HPMdYoPqWwmF30dCGTl1QGECtbuhUURM4PifqiX9eygUlGtnJCBBZXGF1Drl8RwLTadTIFB Vo9DQQvQqxqIYuA8BpeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srmue-0000000D3jA-0wbN; Fri, 20 Sep 2024 23:19:44 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srmtW-0000000D3ci-26K8 for linux-arm-kernel@lists.infradead.org; Fri, 20 Sep 2024 23:18:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D2F455C5A9E; Fri, 20 Sep 2024 23:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 115F8C4CEC3; Fri, 20 Sep 2024 23:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726874312; bh=g8cMyzOEs0S98G+5L/f/JqPHBPyVQgL4h0J5XUiipmA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=e6tbJx3yD/aiLi8NrcKFHltbqwpwy+vKiAFAqu8R5A/oDIOBvzLq8NWVreYGkS5bD 9X5K3W0/12Qg8FCgKWqPnBrCP1fia5+zvod0RiJdPUFEgwxhZ0XRjs/ZWCIfzLh5MA 1tZnNlxNrvwco1PCBauZ2I+bymBx2PQJAcycyZyKvxomlTkHjQGBXRaD3cQ7ylmYZW PVy3BJcsSPLJBm6Q2yN1IItmw/5CfwpCrD59UBpGb7vkLwG9DLjlHNl72oLUSaQFVP SEb6j+Xt9RjijG4I9I0ih4keSlERyv4mAliBWscSqCL+4kCpkQmVjhlohkYwLnnEcR kC67QVahi83ng== Date: Fri, 20 Sep 2024 18:18:30 -0500 From: Bjorn Helgaas To: Riyan Dhiman Cc: vigneshr@ti.com, s-vadapalli@ti.com, lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, kishon@kernel.org, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: dra7xx: Added error handling in probe function when devm_phy_get() fails Message-ID: <20240920231830.GA1073362@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240911171112.46322-2-riyandhiman14@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_161834_609900_1078A794 X-CRM114-Status: GOOD ( 18.57 ) 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 Wed, Sep 11, 2024 at 10:41:13PM +0530, Riyan Dhiman wrote: > While creation of device link, if devm_phy_get() function fails then it directly > returns PTR_ERR without any cleanup of previous added device links. > Added goto statement when devm_phy_get() fails, to handle the cleanup of already > added device links. > > Fixes: 7a4db656a635 (PCI: dra7xx: Create functional dependency between PCIe and PHY) > Signed-off-by: Riyan Dhiman Thanks for this. We're in the v6.12 merge window right now, so please post this again after v6.12-rc1 (probably Sep 29). In subject and commit log, s/Added/Add/. See https://chris.beams.io/posts/git-commit/ and https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/maintainer-tip.rst?id=v6.11#n134 Wrap commit log to fit in 75 columns. Add blank line between paragraphs. > --- > drivers/pci/controller/dwc/pci-dra7xx.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c > index 4fe3b0cb72ec..c329d107b811 100644 > --- a/drivers/pci/controller/dwc/pci-dra7xx.c > +++ b/drivers/pci/controller/dwc/pci-dra7xx.c > @@ -762,8 +762,10 @@ static int dra7xx_pcie_probe(struct platform_device *pdev) > for (i = 0; i < phy_count; i++) { > snprintf(name, sizeof(name), "pcie-phy%d", i); > phy[i] = devm_phy_get(dev, name); > - if (IS_ERR(phy[i])) > - return PTR_ERR(phy[i]); > + if (IS_ERR(phy[i])) { > + ret = PTR_ERR(phy[i]); > + goto err_link; > + } > > link[i] = device_link_add(dev, &phy[i]->dev, DL_FLAG_STATELESS); > if (!link[i]) { > -- > 2.46.0 >