mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
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: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
82c2b5ed6f
commit
242a42eadf
@ -99,8 +99,10 @@ _nouveau_disp_dtor(struct nouveau_object *object)
|
|||||||
|
|
||||||
nouveau_event_destroy(&disp->vblank);
|
nouveau_event_destroy(&disp->vblank);
|
||||||
|
|
||||||
list_for_each_entry_safe(outp, outt, &disp->outp, head) {
|
if (disp->outp.next) {
|
||||||
nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
|
list_for_each_entry_safe(outp, outt, &disp->outp, head) {
|
||||||
|
nouveau_object_ref(NULL, (struct nouveau_object **)&outp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nouveau_engine_destroy(&disp->base);
|
nouveau_engine_destroy(&disp->base);
|
||||||
|
Loading…
Reference in New Issue
Block a user