This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: venus: core: Fix a potential NULL pointer dereference in an 
error handling path
Author:  Christophe JAILLET <[email protected]>
Date:    Thu Aug 12 07:14:22 2021 +0200

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: 9e8efdb57879 ("media: venus: core: vote for video-mem path")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/platform/qcom/venus/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/platform/qcom/venus/core.c 
b/drivers/media/platform/qcom/venus/core.c
index f5fa81896012..fd32385485fa 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -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;
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to