aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-05-22 14:12:37 -0500
committerBen Skeggs <bskeggs@redhat.com>2017-06-06 14:04:03 +1000
commit86276921a17ee3090749c9f38f57dcfb73733bd4 (patch)
treed2c195892b6a0b8357f19790d972b7add759c447 /drivers/gpu/drm/nouveau
parentMerge tag 'topic/dp-quirks-2017-05-31' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes (diff)
downloadlinux-dev-86276921a17ee3090749c9f38f57dcfb73733bd4.tar.xz
linux-dev-86276921a17ee3090749c9f38f57dcfb73733bd4.zip
drm/nouveau/kms/nv50: add null check before pointer dereference
Add null check before dereferencing pointer asyc Addresses-Coverity-ID: 1397932 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index a7663249b3ba..06e564a9ccb2 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -2107,7 +2107,8 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
asyc->set.dither = true;
}
} else {
- asyc->set.mask = ~0;
+ if (asyc)
+ asyc->set.mask = ~0;
asyh->set.mask = ~0;
}