]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
media: mtk-mdp: fix reference count on old device tree
authorMatthias Brugger <matthias.bgg@gmail.com>
Fri, 21 Jun 2019 11:32:50 +0000 (08:32 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:25:50 +0000 (04:25 -0400)
commita0abe2ce0b0ab62c14a3734324a532ba014abe46
tree9a8c3e547c98aeff895a70cd9b1134c4d15ceb7a
parent89e2f9bc3b512195e2b1f7f9ba599fca858a7e07
media: mtk-mdp: fix reference count on old device tree

BugLink: https://bugs.launchpad.net/bugs/1848046
[ Upstream commit 864919ea0380e62adb2503b89825fe358acb8216 ]

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: ba1f1f70c2c0 ("[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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/media/platform/mtk-mdp/mtk_mdp_core.c