mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user