summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-12-08 16:45:43 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-17 18:39:57 +0100
commit4b08eae52f2f73723dbc4dd4d251eb60a7d8c0e1 (patch)
tree5c5b82e99a3793fc2aa71100bab3012469bc4c22 /drivers/gpu
parentdrm: sti: fix module compilation issue (diff)
downloadlinux-4b08eae52f2f73723dbc4dd4d251eb60a7d8c0e1.tar.xz
linux-4b08eae52f2f73723dbc4dd4d251eb60a7d8c0e1.zip
drm/atomic: fix potential null ptr on plane enable
When a plane is being enabled, plane->crtc has not been set yet. Use plane->state->crtc. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 4a78a773151c..bbdbe4721573 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -61,7 +61,7 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
struct drm_crtc_state *crtc_state;
if (plane->state->crtc) {
- crtc_state = state->crtc_states[drm_crtc_index(plane->crtc)];
+ crtc_state = state->crtc_states[drm_crtc_index(plane->state->crtc)];
if (WARN_ON(!crtc_state))
return;