drm/nouveau: zero vma pointer even if we only unreference it rather than free
authorBen Skeggs <bskeggs@redhat.com>
Thu, 23 Jan 2020 03:55:19 +0000 (13:55 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 29 Jan 2020 05:49:46 +0000 (15:49 +1000)
I'm not sure this affects anything, but best be safe.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_vmm.c

index 77061182a1cfc312a011c9b658e33c5e0eae6329..b28c7dc13ad6d083f7cbe0773f8d4a60186a838b 100644 (file)
@@ -69,8 +69,8 @@ nouveau_vma_del(struct nouveau_vma **pvma)
                }
                list_del(&vma->head);
                kfree(*pvma);
-               *pvma = NULL;
        }
+       *pvma = NULL;
 }
 
 int