Commit ca2307ad authored by Marek Vasut's avatar Marek Vasut Committed by Zheng Zengkai
Browse files

media: hantro: Check whether reset op is defined before use

stable inclusion
from stable-v6.6.2
commit 24c06295f28335ced3aad53dd4b0a0bae7b9b100
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24c06295f28335ced3aad53dd4b0a0bae7b9b100



--------------------------------

[ Upstream commit 88d4b23a629ebd34f682f770cb6c2116c851f7b8 ]

The i.MX8MM/N/P does not define the .reset op since reset of the VPU is
done by genpd. Check whether the .reset op is defined before calling it
to avoid NULL pointer dereference.

Note that the Fixes tag is set to the commit which removed the reset op
from i.MX8M Hantro G2 implementation, this is because before this commit
all the implementations did define the .reset op.

Fixes: 6971efb7 ("media: hantro: Allow i.MX8MQ G1 and G2 to run independently")
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Tested-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: default avatarAdam Ford <aford173@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 8729bdc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment