]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 20 Oct 2018 17:50:19 +0000 (13:50 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitcffeebf41c999c76d490342e26fd09258560e594
tree3fca4f1351448ccf3a242aef3390b3e835472d91
parentf71e44bad3733e516ce5eeb16bc5c4b94a585885
media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm()

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 8ea0f2ba0fa3f91ea1b8d823a54b042026ada6b3 ]

of_parse_phandle() returns the device node with refcount incremented.
There are two nodes that are used temporary in mtk_vcodec_init_enc_pm(),
but their refcounts are not decremented.

The patch adds one of_node_put() and fixes returning error codes.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c