提交 242a42ea 编写于 作者: M Maarten Lankhorst 提交者: 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: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 82c2b5ed
......@@ -99,8 +99,10 @@ _nouveau_disp_dtor(struct nouveau_object *object)
nouveau_event_destroy(&disp->vblank);
list_for_each_entry_safe(outp, outt, &disp->outp, head) {
nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
if (disp->outp.next) {
list_for_each_entry_safe(outp, outt, &disp->outp, head) {
nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
}
}
nouveau_engine_destroy(&disp->base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册