media: venus: core: Fix a potential NULL pointer dereference in an error handling path
stable inclusion from stable-v5.10.94 commit 50c4244906d654605639f9b6aecf8bd95050304b bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=50c4244906d654605639f9b6aecf8bd95050304b -------------------------------- [ Upstream commit e4debea9 ] The normal path of the function makes the assumption that 'pm_ops->core_power' may be NULL. We should make the same assumption in the error handling path or a NULL pointer dereference may occur. Add the missing test before calling 'pm_ops->core_power' Fixes: 9e8efdb5 ("media: venus: core: vote for video-mem path") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录