Commit 9551efcf authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50: prevent oops in failure paths

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 3a0bc8cb
...@@ -510,6 +510,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, ...@@ -510,6 +510,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
int ret; int ret;
mutex_init(&dmac->lock); mutex_init(&dmac->lock);
INIT_LIST_HEAD(&dmac->ctxdma);
dmac->ptr = dma_alloc_coherent(nvxx_device(device)->dev, PAGE_SIZE, dmac->ptr = dma_alloc_coherent(nvxx_device(device)->dev, PAGE_SIZE,
&dmac->handle, GFP_KERNEL); &dmac->handle, GFP_KERNEL);
...@@ -556,7 +557,6 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, ...@@ -556,7 +557,6 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
if (ret) if (ret)
return ret; return ret;
INIT_LIST_HEAD(&dmac->ctxdma);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment