Commit 242a42ea authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Ben Skeggs

drm/nouveau/disp: fix oops in destructor with headless cards

If init doesn't run then disp->outp might not be initialized, resulting
in an oops.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 82c2b5ed
...@@ -99,9 +99,11 @@ _nouveau_disp_dtor(struct nouveau_object *object) ...@@ -99,9 +99,11 @@ _nouveau_disp_dtor(struct nouveau_object *object)
nouveau_event_destroy(&disp->vblank); nouveau_event_destroy(&disp->vblank);
if (disp->outp.next) {
list_for_each_entry_safe(outp, outt, &disp->outp, head) { list_for_each_entry_safe(outp, outt, &disp->outp, head) {
nouveau_object_ref(NULL, (struct nouveau_object **)&outp); nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
} }
}
nouveau_engine_destroy(&disp->base); nouveau_engine_destroy(&disp->base);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment