drm/nouveau/sw: fix oops if gpu has its display block disabled
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
2fd04c81dc
commit
13cd1a5511
@ -176,7 +176,7 @@ nv50_software_context_ctor(struct nouveau_object *parent,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
chan->vblank.nr_event = pdisp->vblank->index_nr;
|
chan->vblank.nr_event = pdisp ? pdisp->vblank->index_nr : 0;
|
||||||
chan->vblank.event = kzalloc(chan->vblank.nr_event *
|
chan->vblank.event = kzalloc(chan->vblank.nr_event *
|
||||||
sizeof(*chan->vblank.event), GFP_KERNEL);
|
sizeof(*chan->vblank.event), GFP_KERNEL);
|
||||||
if (!chan->vblank.event)
|
if (!chan->vblank.event)
|
||||||
|
Loading…
Reference in New Issue
Block a user