amvecm: fix LC illegal mem access issue [1/1]

PD#SWPL-12386

Problem:
LC access illegal mem while system shutdown

Solution:
avoid such accessing after mem is freed

Verify:
tl1

Change-Id: Ia817c5054ce863403ea4301c1728e16c4c033986
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
This commit is contained in:
Xihai Zhu
2019-08-07 00:00:01 -04:00
committed by Tao Zeng
parent 939e43d35a
commit 596cc1ea4a

View File

@@ -1493,14 +1493,16 @@ void lc_process(struct vframe_s *vf,
else
bitdepth = 12;
if (!lc_en) {
lc_disable();
return;
}
if (!lc_malloc_ok) {
pr_amlc_dbg("%s: lc malloc fail", __func__);
return;
}
if (!lc_en) {
lc_disable();
return;
}
if (vf == NULL) {
if (lc_flag == 0xff) {
lc_disable();
@@ -1539,4 +1541,5 @@ void lc_free(void)
kfree(curve_nodes_cur);
kfree(curve_nodes_pre);
kfree(lc_hist);
lc_malloc_ok = 0;
}