]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:09 +0000 (20:02 +0100)
commitcef43a90421a840daccf0e2fb42fc53afb27cfaf
treeea9c9a7e7a12b4e3bc1d431c690279f4fc3f1083
parent7db34269808a25731785f5e2aa35fa62716416f4
media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm()

[ 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>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c