video: of: fix memory leak

If of_parse_display_timing() fails we are printing an error message and
jumping to the error path but we missed freeing "dt".

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Sudip Mukherjee 2015-09-30 15:24:08 +05:30 committed by Tomi Valkeinen
parent 4d370b74e7
commit d663baba8b
1 changed files with 1 additions and 0 deletions

View File

@ -210,6 +210,7 @@ struct display_timings *of_get_display_timings(struct device_node *np)
*/
pr_err("%s: error in timing %d\n",
of_node_full_name(np), disp->num_timings + 1);
kfree(dt);
goto timingfail;
}