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: 420a488278 ('video: fbdev: pxafb: initial devicetree conversion')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Dan Carpenter 2016-07-15 14:07:32 +03:00 committed by Tomi Valkeinen
parent 53d73a0adc
commit e0299908d6
1 changed files with 1 additions and 1 deletions

View File

@ -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,