mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
media: venus: core: Fix a potential NULL pointer dereference in an error handling path
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: 9e8efdb578 ("media: venus: core: vote for video-mem path")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
91f2b7d269
commit
e4debea9be
|
|
@ -473,7 +473,8 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
|
|||
err_video_path:
|
||||
icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0);
|
||||
err_cpucfg_path:
|
||||
pm_ops->core_power(core, POWER_ON);
|
||||
if (pm_ops->core_power)
|
||||
pm_ops->core_power(core, POWER_ON);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user