Эх сурвалжийг харах

drm/ttm: cleanup unuse ret value

The ret must be 0 here, otherwise, the function will return after init_mem_type.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui 8 жил өмнө
parent
commit
aef1ba58f5

+ 1 - 2
drivers/gpu/drm/ttm/ttm_bo.c

@@ -1394,7 +1394,7 @@ EXPORT_SYMBOL(ttm_bo_evict_mm);
 int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
 int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
 			unsigned long p_size)
 			unsigned long p_size)
 {
 {
-	int ret = -EINVAL;
+	int ret;
 	struct ttm_mem_type_manager *man;
 	struct ttm_mem_type_manager *man;
 	unsigned i;
 	unsigned i;
 
 
@@ -1412,7 +1412,6 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
 		return ret;
 		return ret;
 	man->bdev = bdev;
 	man->bdev = bdev;
 
 
-	ret = 0;
 	if (type != TTM_PL_SYSTEM) {
 	if (type != TTM_PL_SYSTEM) {
 		ret = (*man->func->init)(man, p_size);
 		ret = (*man->func->init)(man, p_size);
 		if (ret)
 		if (ret)