summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-15 14:07:32 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-11 17:54:57 +0300
commite0299908d606a99e7ffb467bc3c11dfe54133af3 (patch)
tree308d05daffe49c3d4980cd8482cb9c12a470eba2 /drivers/video
parent53d73a0adc818d6a72168c7cc33dd2a45735131a (diff)
downloadlinux-riscv-e0299908d606a99e7ffb467bc3c11dfe54133af3.tar.gz
linux-riscv-e0299908d606a99e7ffb467bc3c11dfe54133af3.tar.bz2
linux-riscv-e0299908d606a99e7ffb467bc3c11dfe54133af3.zip
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: 420a488278e8 ('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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/pxafb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 2c0487f4f805..ed41fdb42d13 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -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,