Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1459729 > unrolled thread
| Started by | Tomi Valkeinen <tomi.valkeinen@ti.com> |
|---|---|
| First post | 2016-08-10 22:00 +0200 |
| Last post | 2016-08-10 22:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [patch] video: fbdev: pxafb: potential NULL dereference on error Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-08-10 22:00 +0200
| From | Tomi Valkeinen <tomi.valkeinen@ti.com> |
|---|---|
| Date | 2016-08-10 22:00 +0200 |
| Subject | Re: [patch] video: fbdev: pxafb: potential NULL dereference on error |
| Message-ID | <s4HPr-16w-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On 15/07/16 14:07, Dan Carpenter wrote:
> 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>
>
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index 2c0487f..ed41fdb 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,
>
Thanks, queued for v4.9.
Tomi
Back to top | Article view | linux.kernel
csiph-web