Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp255602lqj; Sat, 1 Jun 2024 18:33:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCmi9Z/Ba27lspdPkVGsqT3Qzq4FE1xsYAAM/71WPeaIqBLcBPC4gJDYBAbYk5xRxSrIkaa4bwlA0k8YTZmlEWwrv65jiKIq456UeEpw== X-Google-Smtp-Source: AGHT+IEijc+178c2+obdNyIhjVgcSoK/r1PjdaOTNl5sFlyTyfaviDYuvJIJS9UVcQWNdnR443B+ X-Received: by 2002:a37:c249:0:b0:792:8dc3:d714 with SMTP id af79cd13be357-794f5ec6a1fmr548594485a.76.1717292036609; Sat, 01 Jun 2024 18:33:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717292036; cv=pass; d=google.com; s=arc-20160816; b=IAZlBjezjzNDWQKqbWxphbqSTgXyWZwTRGZa2Dj3xXHbLlDcT+e9o3qO1jo4UlqSkP guMGq7CehxEZfZHUPkCBbvjU79bvv5hhAu69XuMOmP/Q7Jc1ufOkLO57Kya3sBQey20R Y/wqD9Zlw/cIirDSB0b2GX8xiKbQGtrsUxECBPO51imJaRy9sb6njbB5QS91038leRHn XamEMIrCqKvWBBiC793TLUfz22btuwvVRlxsegjD3m/kH7KmhKK1y/eaKZO/inqPGlEf pXiiBjFbtyTqJKGpAo5t3YKBWPsrOa+YAlLvQUS96+dMeuISxUAC0wd9/iOadbBUG9N5 XaCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=NxaxaTDvTYoiYmYWtCJv/7sGuhc5KKGpJm/etOuESak=; fh=EufDMRS9cwsN3bdTQZejsw6GUfOhRPx8sQn5MIe8+sA=; b=pw4eOL4n5HdZWQNP/tfBSDaDb++l1/iX2mnWFzZ10ffH0qlTAkze0D+DGJ6Qi1Xa6+ ilku91lo8eKi854du8EVuVZc0mYVuvAeTLMK0/izmVhaXF7eg7JSFOCiQlKwNEnOUhKc l+voph7AzMssTTBbEX2S4YcYmlMSUCGaBF9AZTEYfOnbBMtHfTC//q+1mY+McW5J/+p6 cb0lMCjwIuOwKu7xWlfWF3E2i9gFElCOJlXea7vSHFCQ9Q449o80VMzxyh8pQAjIaSOW EA0+D4y+tw4WPK5mir6O4g73VhUwk7nVqBzl38lR6p/w3TixtKM4FMrR8cLsy5kchDU3 FXug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GxF7UmHy; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-198069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f32c2a48si607129785a.772.2024.06.01.18.33.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 18:33:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GxF7UmHy; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-198069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5972C1C20BBC for ; Sun, 2 Jun 2024 01:33:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B6821FC4; Sun, 2 Jun 2024 01:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GxF7UmHy" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 980901C06; Sun, 2 Jun 2024 01:33:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717292030; cv=none; b=rDgeCNohARngVaYeZnV1Ed6BhadSjfsGXvj83zhwEl0TLzryr3TSgEA+YVccA/BMYJQfTHw+oX9G0mB1CJju5vGMpWWI9335Fq1HE9dZAFcS7K01XjAvB2ROMpiinAwI5XnHdewueSGE/ymA843kwW4E+FVLrLsHGLHt7+dq1vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717292030; c=relaxed/simple; bh=XdxcvQrH7p0DQxEfPUL/IAa4KIlheTgoqVanz15UsX0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=kHfcIk0Vs8EFNgSxtEywfNbG6aWcVk+PEJdKOkyVT3qo6C6a9Zd9xIg5r3gcs/wQMIBAVCA+0rlNK8mgJB2u682foruTrXkLeIo3dNqz3RbQJ7K5TrusZRV1Qu5RrL1oHyj0IJFQQ1kZqBqHbU+GEB4h2aQvfsRowT/WW10qeCU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=GxF7UmHy; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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; } -- 2.40.1