]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/ttm: cleanup unuse ret value
authorHuang Rui <ray.huang@amd.com>
Mon, 17 Apr 2017 07:32:52 +0000 (15:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:37 +0000 (17:32 -0400)
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>
drivers/gpu/drm/ttm/ttm_bo.c

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