Skip to contentSkip to conversation

FAILED: patch "[PATCH] dmaengine: stm32: dmamux: fix OF node leak on route" failed to apply to 6.6-stable tree

PATCH New [email protected] 2 participants 2 messages Jan 20 – Jan 21

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x b1b590a590af13ded598e70f0b72bc1e515787a1
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026012005-grid-smell-308a@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From b1b590a590af13ded598e70f0b72bc1e515787a1 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 17 Nov 2025 17:12:53 +0100
Subject: [PATCH] dmaengine: stm32: dmamux: fix OF node leak on route
allocation failure

Make sure to drop the reference taken to the DMA master OF node also on late route allocation failures.

Fixes df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
Cc Pierre-Yves MORDRET <[email protected]>
drivers/dma/stm32/stm32-dmamux.c +3 -1
index 791179760782..2bd218dbabbb 100644
@@ -143,7 +143,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
 	ret = pm_runtime_resume_and_get(&pdev->dev);
 	if (ret < 0) {
 		spin_unlock_irqrestore(&dmamux->lock, flags);
-		goto error;
+		goto err_put_dma_spec_np;
 	}
 	spin_unlock_irqrestore(&dmamux->lock, flags);
 
@@ -165,6 +165,8 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
 
 	return mux;
 
+err_put_dma_spec_np:
+	of_node_put(dma_spec->np);
 error:
 	clear_bit(mux->chan_id, dmamux->dma_inuse);
 
maintainer
#1 lore raw

PATCH 1/1 dmaengine: stm32: dmamux: fix OF node leak on route allocation failure

From: Johan Hovold <[email protected]>

[ Upstream commit b1b590a590af13ded598e70f0b72bc1e515787a1 ]

Make sure to drop the reference taken to the DMA master OF node also on late route allocation failures.

Fixes df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
Cc Pierre-Yves MORDRET <[email protected]>
---
 drivers/dma/stm32-dmamux.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/stm32-dmamux.c +3 -1
index 8d77e2a7939a0..3a6907fbb5a3e 100644
@@ -142,7 +142,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
 	ret = pm_runtime_resume_and_get(&pdev->dev);
 	if (ret < 0) {
 		spin_unlock_irqrestore(&dmamux->lock, flags);
-		goto error;
+		goto err_put_dma_spec_np;
 	}
 	spin_unlock_irqrestore(&dmamux->lock, flags);
 
@@ -162,6 +162,8 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
 
 	return mux;
 
+err_put_dma_spec_np:
+	of_node_put(dma_spec->np);
 error:
 	clear_bit(mux->chan_id, dmamux->dma_inuse);
 
Signature · 1 line
2.51.0