提交 e0299908 编写于 作者: D Dan Carpenter 提交者: Tomi Valkeinen

video: fbdev: pxafb: potential NULL dereference on error

If we "goto out;" then it calls display_timings_release(timings);
Since "timings" is NULL, that's going to oops.  Just return directly.

Fixes: 420a4882 ('video: fbdev: pxafb: initial devicetree conversion')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 53d73a0a
......@@ -2125,7 +2125,7 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
timings = of_get_display_timings(disp);
if (!timings)
goto out;
return -EINVAL;
ret = -ENOMEM;
info->modes = kmalloc_array(timings->num_timings,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册