Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -99,9 +99,11 @@ _nouveau_disp_dtor(struct nouveau_object *object)

	nouveau_event_destroy(&disp->vblank);

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