Loading
msm: mdss: Don't cache the address of a stack variable in timings init
When the panel timings are parsed, a stack-allocated variable is used to
store the parsed data; however, this creates two problems. The first
problem is that this creates a memory leak since a kstrdup() address is
stored into the stack-allocated variable at the end of the
mdss_dsi_panel_timing_from_dt() function. The second problem this creates
is that the address of the stack-allocated variable is stored into the
current_timing struct member (inside mdss_dsi_panel_timing_switch()) for
future use in the driver.
Since the data that current_timing points to is expected to persist long
after init, allocate memory for the timing settings to fix the issues.
Change-Id: I2bbc957b229a010c1b5701f2e40e42e65cd88b2d
Signed-off-by:
Sultanxda <sultanxda@gmail.com>