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>
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();
kfree(curve_nodes_cur);
kfree(curve_nodes_pre);
kfree(lc_hist);
+ lc_malloc_ok = 0;
}