drm/ttm: Remove unnecessary '0' values from ret
authorLi zeming <zeming@nfschina.com>
Wed, 7 Sep 2022 03:29:34 +0000 (11:29 +0800)
committerChristian König <christian.koenig@amd.com>
Wed, 7 Sep 2022 07:42:57 +0000 (09:42 +0200)
The variable ret is assigned in the judgment branch statement, he does
not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220907032934.4490-1-zeming@nfschina.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
include/drm/ttm/ttm_bo_driver.h

index 897b88f0bd59b69a50251d2e403d6bf019608e29..1afa891f488a393ce0671d0eb7a23b791ec8bcd7 100644 (file)
@@ -106,7 +106,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
                                 bool interruptible, bool no_wait,
                                 struct ww_acquire_ctx *ticket)
 {
-       int ret = 0;
+       int ret;
 
        if (no_wait) {
                bool success;