gpu: drm: nouveau: add null check before pointer dereference
Subsystems (3)
PATCH 1/1 gpu: drm: nouveau: add null check before pointer dereference
Add null check before dereferencing pointer asyc
Addresses-Coverity-ID: 1397932
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nv50_display.c +2 -1
@@ -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 ; }
Signature · 1 line
2.5.0
Quoted 1 line · Gustavo A. R. Silva
Add null check before dereferencing pointer asyc
I've taken the patch into my tree, thanks!
Ben.
Quoted 13 lines
Addresses-Coverity-ID: 1397932
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/nv50_display.c +0
-0
drivers/gpu/drm/nouveau/nv50_display.c nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state) · line 2114
Quoted 9 lines
drivers/gpu/drm/nouveau/nv50_display.c +2
-1@@ -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 ; }
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau