diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-09-01 03:39:04 +0200 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-09-02 16:28:56 +1000 |
commit | ff6fdbed8f465f796da7ab32cde67e2dfb9e1f8f (patch) | |
tree | b0ddb81fe618d86b3f24e5906240bbb089b99fce /drivers/gpu/drm/drm_crtc_helper.c | |
parent | 9c552dd79346f86a3b53e41255c92c6f560b80fb (diff) | |
download | kernel-crypto-ff6fdbed8f465f796da7ab32cde67e2dfb9e1f8f.tar.gz kernel-crypto-ff6fdbed8f465f796da7ab32cde67e2dfb9e1f8f.tar.xz kernel-crypto-ff6fdbed8f465f796da7ab32cde67e2dfb9e1f8f.zip |
drm/crtc_helper: avoid NULL-pointer dereference when encoder is NULL
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index db0237dec6c..e7e6c25b560 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -842,7 +842,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) /* If the encoder is reused for another connector, then * the appropriate crtc will be set later. */ - connector->encoder->crtc = NULL; + if (connector->encoder) + connector->encoder->crtc = NULL; connector->encoder = new_encoder; } } |