mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: of: device: Fix missing of_node_put() in of_dma_set_restricted_buffer
We should use of_node_put() for the reference 'node' returned by of_parse_phandle() which will increase the refcount. Bug: 254441685 Fixes:fec9b62509("of: Add plumbing for restricted DMA pool") Co-authored-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220702014449.263772-1-windhl@126.com (cherry picked from commitd17e37c41b) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: Ib56e5a7b71e8785b5d8e7947cdbee7be501cfd21
This commit is contained in:
committed by
Treehugger Robot
parent
ee3bce3554
commit
6d03ca09dd
@@ -102,8 +102,11 @@ of_dma_set_restricted_buffer(struct device *dev, struct device_node *np)
|
||||
* restricted-dma-pool region is allowed.
|
||||
*/
|
||||
if (of_device_is_compatible(node, "restricted-dma-pool") &&
|
||||
of_device_is_available(node))
|
||||
of_device_is_available(node)) {
|
||||
of_node_put(node);
|
||||
break;
|
||||
}
|
||||
of_node_put(node);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user