Skip to content

Commit

Permalink
drm/nouveau/mmu: don't attempt to dereference vmm without valid insta…
Browse files Browse the repository at this point in the history
…nce pointer

Fixes oopses in certain failure paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Sep 6, 2018
1 parent a43b16d commit 51ed833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ nvkm_vmm_get(struct nvkm_vmm *vmm, u8 page, u64 size, struct nvkm_vma **pvma)
void
nvkm_vmm_part(struct nvkm_vmm *vmm, struct nvkm_memory *inst)
{
if (vmm->func->part && inst) {
if (inst && vmm->func->part) {
mutex_lock(&vmm->mutex);
vmm->func->part(vmm, inst);
mutex_unlock(&vmm->mutex);
Expand Down

0 comments on commit 51ed833

Please sign in to comment.