Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ti: edma: fix OF node reference leaks in edma_driver

The .probe() of edma_driver calls of_parse_phandle_with_fixed_args() but
does not release the obtained OF nodes. Thus add a of_node_put() call.

This bug was found by an experimental verification tool that I am
developing.

Fixes: 1be5336bc7ba ("dmaengine: edma: New device tree binding")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241219020507.1983124-3-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Joe Hattori and committed by
Vinod Koul
e883c647 0ab43318

+1 -2
+1 -2
drivers/dma/ti/edma.c
··· 208 208 struct edma_cc; 209 209 210 210 struct edma_tc { 211 - struct device_node *node; 212 211 u16 id; 213 212 }; 214 213 ··· 2465 2466 if (ret) 2466 2467 break; 2467 2468 2468 - ecc->tc_list[i].node = tc_args.np; 2469 2469 ecc->tc_list[i].id = i; 2470 2470 queue_priority_mapping[i][1] = tc_args.args[0]; 2471 2471 if (queue_priority_mapping[i][1] > lowest_priority) { 2472 2472 lowest_priority = queue_priority_mapping[i][1]; 2473 2473 info->default_queue = i; 2474 2474 } 2475 + of_node_put(tc_args.np); 2475 2476 } 2476 2477 2477 2478 /* See if we have optional dma-channel-mask array */