提交 37b617f9 编写于 作者: C Christian Engelmayer 提交者: Tomi Valkeinen

video: Fix possible leak in of_get_videomode()

In case videomode_from_timings() fails in function of_get_videomode(), the
allocated display timing data is not freed in the exit path. Make sure that
display_timings_release() is called in any case. Detected by Coverity CID
1309681.
Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 9e6e35ed
......@@ -44,11 +44,9 @@ int of_get_videomode(struct device_node *np, struct videomode *vm,
index = disp->native_mode;
ret = videomode_from_timings(disp, vm, index);
if (ret)
return ret;
display_timings_release(disp);
return 0;
return ret;
}
EXPORT_SYMBOL_GPL(of_get_videomode);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册