[PATCH] drm: Check if the allocation has succeeded before dereferencing newmode

2014-03-04 Thread Alex Deucher
On Mon, Mar 3, 2014 at 6:59 PM, Damien Lespiau wrote: > We allocate memory in drm_display_mode_from_vic_index() and use it > without checking the pointer is valid. Fix that. > > Signed-off-by: Damien Lespiau Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/drm_edid.c | 3 +++ > 1 file

[PATCH] drm: Check if the allocation has succeeded before dereferencing newmode

2014-03-03 Thread Damien Lespiau
We allocate memory in drm_display_mode_from_vic_index() and use it without checking the pointer is valid. Fix that. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index