From nobody Thu Oct 2 20:44:51 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 5F4352D1319 for ; Thu, 11 Sep 2025 21:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757627817; cv=none; b=RapfCZmvAgTCu5arbFyGJxvx7TCUyH4nyURueMkvrFSYj6bmPX2ZP3bzbRqNtExpVVvXJjd8zvLk30yXyAxHtd7xaAJ5aTx0HxpAUewaHZ8WKSaygo61Aal63O2LuYx8rPB8GUMG6ciwiTNMi6q6JUz+Ihi83DEqf6S2PSqcGEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757627817; c=relaxed/simple; bh=9zF4mej1ibTbrnImtNt9POEB2AmOALM3WqplmmIKV4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SseBMyhOuZTzmPF0caia3XWJ14c4s94m2OYU8xkwBc92ZarjPD4PQt5XkVbwlYcJZKTlfWwJ4EkLQWB29qciyIL55JD01JuB4UpwRSmJILL2CK2Do95a4DxbT0jEem/YOEP5H2adLbGtsYQzTl1x2Z2eTU4HCaQPZvLIPCEcmZM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uwpHe-0004g5-0q; Thu, 11 Sep 2025 23:56:50 +0200 From: Marco Felsch Date: Thu, 11 Sep 2025 23:56:42 +0200 Subject: [PATCH v2 01/10] dmaengine: imx-sdma: fix missing of_dma_controller_free() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250911-v6-16-topic-sdma-v2-1-d315f56343b5@pengutronix.de> References: <20250911-v6-16-topic-sdma-v2-0-d315f56343b5@pengutronix.de> In-Reply-To: <20250911-v6-16-topic-sdma-v2-0-d315f56343b5@pengutronix.de> To: Vinod Koul , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jiada Wang Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marco Felsch X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Add the missing of_dma_controller_free() to free the resources allocated via of_dma_controller_register() during probe(). The missing free was introduced long time ago by commit 23e118113782 ("dma: imx-sdma: use module_platform_driver for SDMA driver") while adding a proper .remove() implementation. Use the driver remove() callback to make it possible to backport this commit. Fixes: 23e118113782 ("dma: imx-sdma: use module_platform_driver for SDMA dr= iver") Signed-off-by: Marco Felsch Reviewed-by: Frank Li Reviewed-by: Peng Fan --- drivers/dma/imx-sdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 02a85d6f1bea2df7d355858094c0c0b0bd07148e..3ecb917214b1268b148a29df697= b780bc462afa4 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -2418,6 +2418,7 @@ static void sdma_remove(struct platform_device *pdev) struct sdma_engine *sdma =3D platform_get_drvdata(pdev); int i; =20 + of_dma_controller_free(sdma->dev->of_node); devm_free_irq(&pdev->dev, sdma->irq, sdma); dma_async_device_unregister(&sdma->dma_device); kfree(sdma->script_addrs); --=20 2.47.3