[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aOU9BXjYDNoPRQmf@homelab>
Date: Wed, 8 Oct 2025 00:17:09 +0800
From: Shuhao Fu <sfual@....ust.hk>
To: Lyude Paul <lyude@...hat.com>, Danilo Krummrich <dakr@...nel.org>
Cc: dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep
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.
Signed-off-by: Shuhao Fu <sfual@....ust.hk>
Fixes: 9ce523cc3bf2 ("drm/nouveau: separate buffer object backing memory from nvkm structures")
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index b96f0555ca14..f26562eafffc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -929,7 +929,7 @@ nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo,
nvif_vmm_put(vmm, &old_mem->vma[1]);
nvif_vmm_put(vmm, &old_mem->vma[0]);
}
- return 0;
+ return ret;
}
static int
--
2.39.5
Powered by blists - more mailing lists