]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/nouveau: fix bad ret code in nouveau_bo_move_prep
authorShuhao Fu <sfual@cse.ust.hk>
Tue, 7 Oct 2025 16:17:09 +0000 (00:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:12 +0000 (16:23 +0200)
commit e4bea919584ff292c9156cf7d641a2ab3cbe27b0 upstream.

In `nouveau_bo_move_prep`, if `nouveau_mem_map` fails, an error code
should be returned. Currently, it returns zero even if vmm addr is not
correctly mapped.

Cc: stable@vger.kernel.org
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
Fixes: 9ce523cc3bf2 ("drm/nouveau: separate buffer object backing memory from nvkm structures")
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nouveau_bo.c

index 2953d6a6d390807b7a2a840f00bdc806569b4d7b..ab571b76b129f2266e1326e70b9af8977ef9dec9 100644 (file)
@@ -791,7 +791,7 @@ done:
                nvif_vmm_put(vmm, &old_mem->vma[1]);
                nvif_vmm_put(vmm, &old_mem->vma[0]);
        }
-       return 0;
+       return ret;
 }
 
 static int