mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 12:16:56 +07: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);
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user