Commit ff6fdbed authored by Maarten Maathuis's avatar Maarten Maathuis Committed by Dave Airlie

drm/crtc_helper: avoid NULL-pointer dereference when encoder is NULL

Signed-off-by: default avatarMaarten Maathuis <madman2003@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 9c552dd7
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment