[Intel-gfx] [PATCH 24/37] drm: Check for malloc failure from drm_cvt_create().
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 10 23:45:11 CET 2010
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Dave Airlie <airlied at redhat.com>
---
drivers/gpu/drm/drm_crtc_helper.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index f24f5ee..0dd3ce4 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -331,6 +331,9 @@ create_mode:
cmdline_mode->refresh_specified ? cmdline_mode->refresh : 60,
cmdline_mode->rb, cmdline_mode->interlace,
cmdline_mode->margins);
+ if (mode == NULL)
+ return NULL;
+
drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
list_add(&mode->head, &connector->modes);
return mode;
--
1.7.0
More information about the Intel-gfx
mailing list