mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 10:44:23 +08:00
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>
This commit is contained in:
parent
9c552dd793
commit
ff6fdbed8f
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user