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 CA19EC433EF for ; Fri, 1 Jul 2022 11:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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=xM8cAY17lC9WXwhLSSeHoTRppsCPjleXqnzq4BP9EHk=; b=VrM+CbgKMdUEVs TG4FhyDWGRvWtVh1KzYnFwKgYWuUfeuUhOWvu+/KS/oSjVTdw8nl9Bw2N1/PaU4829BelN4ka6SIi tAQpR6FgnYMRS66ar8txtmCZc/AYLPDyhGpuF4Ld6methH9ePWBlSGkN2oWnzktsx13QJ9X3VRKdQ tgFQItIbTtAbYJNUd2L720f9qO9dDIjhHsQa6+0wstzEoDNpihrWAjDImSiE67HPZzOOHFkkFSsKx TwlPBO8BpGumYxJAYgEcJSZRK3RgSf7VIcyPkJmnekaUzhdvDVd28V5M1jKbxm7xQ/1AW9sWhAP95 KnSJH0qIY94cpnSeL0SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7FB1-004TTS-72; Fri, 01 Jul 2022 11:51:11 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7FAv-004TRj-4t for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2022 11:51:09 +0000 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 6D82F625B9; Fri, 1 Jul 2022 11:51:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 380F6C3411E; Fri, 1 Jul 2022 11:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656676262; bh=4eMF5Lv45+x+6vXGYFITbqtwdsOKmSrLzeWgO58065k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bUKFi9fe5DBtdRq6Qb4O6OaF7+MWx3eUynAU8vnQ7Ql6FITsDA7gczurAbCqtvrUI OwYq36ofXp8c1g8RNh7Py4ZMN2DoW0fK50k6/0oLXmHDAcoBOtdzN7MNBqigkpLayc X/Le+IzAJLRQribUxp13THCe5hEL7G25gKPsxQr4RjPITx7LSDqwAgDe7xZCRnyqXU d7hCzWZC5k0sgE4U2qKxxpzOBDWhN59yqwK5839UzBNdZmOWvF+/5GjuJyUpFdL/Mn bzZBxWvfh8OYWZS2I7G7yQco4DJaDebZj5uKJzsfiecBk/dqEP/VASok8/rE2nuN3a DimAYn8nKxg1A== Date: Fri, 1 Jul 2022 17:20:58 +0530 From: Vinod Koul To: Swati Agarwal Cc: lars@metafoo.de, adrianml@alumnos.upm.es, libaokun1@huawei.com, marex@denx.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, harini.katakam@xilinx.com, radhey.shyam.pandey@xilinx.com, michal.simek@xilinx.com Subject: Re: [PATCH 1/2] dmaengine: xilinx_dma: Fix probe error cleanup Message-ID: References: <20220624063539.18657-1-swati.agarwal@xilinx.com> <20220624063539.18657-2-swati.agarwal@xilinx.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220624063539.18657-2-swati.agarwal@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220701_045105_289471_8617573B X-CRM114-Status: GOOD ( 22.73 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 24-06-22, 12:05, Swati Agarwal wrote: > When probe fails remove dma channel resources and disable clocks in > accordance with the order of resources allocated . Ok this looks fine and the changes below.. > > Add missing cleanup in devm_platform_ioremap_resource(), xlnx,num-fstores > property. Where is this part? > > Signed-off-by: Swati Agarwal > Reviewed-by: Radhey Shyam Pandey > --- > drivers/dma/xilinx/xilinx_dma.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c > index cd62bbb50e8b..fbf341e8c36f 100644 > --- a/drivers/dma/xilinx/xilinx_dma.c > +++ b/drivers/dma/xilinx/xilinx_dma.c > @@ -3160,8 +3160,10 @@ static int xilinx_dma_probe(struct platform_device *pdev) > > /* Request and map I/O memory */ > xdev->regs = devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(xdev->regs)) > - return PTR_ERR(xdev->regs); > + if (IS_ERR(xdev->regs)) { > + err = PTR_ERR(xdev->regs); > + goto disable_clks; > + } > > /* Retrieve the DMA engine properties from the device tree */ > xdev->max_buffer_len = GENMASK(XILINX_DMA_MAX_TRANS_LEN_MAX - 1, 0); > @@ -3190,7 +3192,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) > if (err < 0) { > dev_err(xdev->dev, > "missing xlnx,num-fstores property\n"); > - return err; > + goto disable_clks; > } > > err = of_property_read_u32(node, "xlnx,flush-fsync", > @@ -3259,7 +3261,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) > for_each_child_of_node(node, child) { > err = xilinx_dma_child_probe(xdev, child); > if (err < 0) > - goto disable_clks; > + goto error; > } > > if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { > @@ -3294,12 +3296,12 @@ static int xilinx_dma_probe(struct platform_device *pdev) > > return 0; > > -disable_clks: > - xdma_disable_allclks(xdev); > error: > for (i = 0; i < xdev->dma_config->max_channels; i++) > if (xdev->chan[i]) > xilinx_dma_chan_remove(xdev->chan[i]); > +disable_clks: > + xdma_disable_allclks(xdev); > > return err; > } > -- > 2.17.1 -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel