diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2012-03-13 12:35:48 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-15 09:52:30 +0000 |
commit | 6bfc56aa89f963becbafbaeb105b6a84e0eb0db7 (patch) | |
tree | 46798969a078d0e14e34ebaa13d2b24d0a53e58d /drivers/gpu/drm/drm_crtc_helper.c | |
parent | 93bbf6dbdadbb47ef5a19aecf45669c01ee8830d (diff) |
drm: Handle drm_object_get() failures
Check drm_mode_object_get() return value everywhere.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index d761d124115..d9d66846c61 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -352,6 +352,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, return true; adjusted_mode = drm_mode_duplicate(dev, mode); + if (!adjusted_mode) + return false; saved_hwmode = crtc->hwmode; saved_mode = crtc->mode; |