]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: mtk-vcodec: venc: fix return value when start_streaming fails
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Fri, 28 May 2021 08:36:41 +0000 (10:36 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:56 +0000 (07:32 +0100)
commit643022b756f6f9bf0af17183820e42c0c9659063
tree09f49c37691b353188914be8f5cd9e686999b379
parent36894ef018aa0fd3285b6907d6c66d9392c11651
media: mtk-vcodec: venc: fix return value when start_streaming fails

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 065a7c66bd8b21db212fa86187ff12f0cac6ea6d ]

In case vb2ops_venc_start_streaming fails, the error value
is overwritten by the ret value of pm_runtime_put which might
be 0. Fix it.

Fixes: 985c73693fe5a (" media: mtk-vcodec: Separating mtk encoder driver")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c