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>
This commit is contained in:
Gustavo A. R. Silva 2017-05-22 14:12:37 -05:00 committed by Ben Skeggs
parent 28904eeced
commit 86276921a1

View File

@ -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;
}