mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: mtk-mdp: fix reference count on old device tree
[ Upstream commit864919ea03] of_get_next_child() increments the reference count of the returning device_node. Decrement it in the check if we are using the old or the new DTB. Fixes:ba1f1f70c2("[media] media: mtk-mdp: Fix mdp device tree") Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Acked-by: Houlong Wei <houlong.wei@mediatek.com> [hverkuil-cisco@xs4all.nl: use node instead of parent as temp variable] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
066afce8d8
commit
e3f5f626e1
@@ -118,7 +118,9 @@ static int mtk_mdp_probe(struct platform_device *pdev)
|
||||
mutex_init(&mdp->vpulock);
|
||||
|
||||
/* Old dts had the components as child nodes */
|
||||
if (of_get_next_child(dev->of_node, NULL)) {
|
||||
node = of_get_next_child(dev->of_node, NULL);
|
||||
if (node) {
|
||||
of_node_put(node);
|
||||
parent = dev->of_node;
|
||||
dev_warn(dev, "device tree is out of date\n");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user