[PATCH AUTOSEL 4.4 1/2] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve

Sasha Levin sashal at kernel.org
Sat Dec 12 16:09:15 UTC 2020


From: Christian König <christian.koenig at amd.com>

[ Upstream commit aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d ]

This wasn't initialized for pre NV50 hardware.

Signed-off-by: Christian König <christian.koenig at amd.com>
Reported-and-Tested-by: Mark Hounschell <markh at compro.net>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Link: https://patchwork.freedesktop.org/series/84298/
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 78f520d05de92..3801abe8e6d41 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1395,6 +1395,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
 			nvkm_vm_map(&node->bar_vma, node);
 			mem->bus.offset = node->bar_vma.offset;
 		}
+		ret = 0;
 		break;
 	default:
 		return -EINVAL;
-- 
2.27.0



More information about the dri-devel mailing list