From patchwork Sun Jun 2 01:33:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13682598 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 EB7C4C25B76 for ; Sun, 2 Jun 2024 01:33:56 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=M7l/EWX23XKDRS8wKdxapESckJZgMs3CelgcKnqhu4Y=; b=kz9GoJ8pqB+zjA OqiaONChYckMG3pYUexFlYcL4ogZhUVsry+Lzktfv3Bh7bclxPvjynOvqWgY3e+POdTORAvn3A5iv IlJPqPgG3Sf3lTlU7snUHQ02ycoxCDpGOwOaim3t7BmtHOM5Yr2IBLyteAh1IH6/Qhrpvu3wjifZl xE2NyA+o6MuytGnKOLeh3SnU9ULkAqSVH9GVqnC4LZlUkMYATeuxflB3iOdMDFZNWPXryl+z5bJkI tod2Y3D1ipujAiSozByzQovN30YuFq1b3+ZCuTJxCQXC8PGhCmHid5JW2vLXW3hk/4FWkZldLkbjL xOke6dSKPR/JhXeLj0eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDa6Q-0000000DYWD-3O2D; Sun, 02 Jun 2024 01:33:42 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDa6N-0000000DYUt-1Le7 for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 01:33:41 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4521XNXO114874; Sat, 1 Jun 2024 20:33:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717292003; bh=NxaxaTDvTYoiYmYWtCJv/7sGuhc5KKGpJm/etOuESak=; h=From:To:CC:Subject:Date; b=GxF7UmHy+kgERAmA2VCDcTeD1EDVsfvmqsIGkURjIzmfNZgit4DruF3nY/I653FCu 7LTEQnpdpTMPCktptcbG9sH4ZYo7AGky8zbkucOYc9Swma1ZAF0COuBklZYpCUAPrH ggFpcNSEPZgnUfHzXUUhbfx1AuNJRQ2AYyC1DFdw= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4521XNSE059863 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 1 Jun 2024 20:33:23 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Sat, 1 Jun 2024 20:33:23 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Sat, 1 Jun 2024 20:33:23 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4521XKQ0071063; Sat, 1 Jun 2024 20:33:20 -0500 From: Siddharth Vadapalli To: , , CC: , , , , Subject: [PATCH v2] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id() Date: Sun, 2 Jun 2024 07:03:19 +0530 Message-ID: <20240602013319.2975894-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240601_183339_549521_D7E390D7 X-CRM114-Status: GOOD ( 10.51 ) 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 The of_k3_udma_glue_parse_chn_by_id() helper function erroneously invokes "of_node_put()" on the "udmax_np" device-node passed to it, without having incremented its reference count at any point. Fix it. Fixes: 81a1f90f20af ("dmaengine: ti: k3-udma-glue: Add function to parse channel by ID") Signed-off-by: Siddharth Vadapalli Acked-by: Peter Ujfalusi --- Hello, This patch is based on commit 83814698cf48 Merge tag 'powerpc-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux of Mainline Linux. v1 of this patch is at: https://lore.kernel.org/r/20240518100556.2551788-1-s-vadapalli@ti.com/ Changes since v1: - Rebased patch on latest Mainline Linux. - Collected "Acked-by" tag from Peter Ujfalusi from: https://lore.kernel.org/r/8b2e4b7f-50ae-4017-adf2-2e990cd45a25@gmail.com/ - Updated commit message based on feedback from Markus Elfring at: https://lore.kernel.org/r/22a66571-0a0c-46dd-899a-d24079372880@web.de/ with the change being: s/..incremented its reference at../..incremented its reference count at../ Regards, Siddharth. drivers/dma/ti/k3-udma-glue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c index c9b93055dc9d..f0a399cf45b2 100644 --- a/drivers/dma/ti/k3-udma-glue.c +++ b/drivers/dma/ti/k3-udma-glue.c @@ -200,12 +200,9 @@ of_k3_udma_glue_parse_chn_by_id(struct device_node *udmax_np, struct k3_udma_glu ret = of_k3_udma_glue_parse(udmax_np, common); if (ret) - goto out_put_spec; + return ret; ret = of_k3_udma_glue_parse_chn_common(common, thread_id, tx_chn); - -out_put_spec: - of_node_put(udmax_np); return ret; }