Skip to contentSkip to conversation

drm/ttm: Remove unnecessary '0' values from ret

PATCH In review Li zeming 2 participants 2 messages Sep 7, 2022

Subsystems (2)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 drm/ttm: Remove unnecessary '0' values from ret

The variable ret is assigned in the judgment branch statement, he does not need to initialize the assignment.

---
 include/drm/ttm/ttm_bo_driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/ttm/ttm_bo_driver.h +1 -1
index 897b88f0bd59..1afa891f488a 100644
@@ -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;
Signature · 1 line
2.18.2
#1 lore raw

Am 07.09.22 um 05:29 schrieb Li zeming:

Quoted 4 lines

The variable ret is assigned in the judgment branch statement, he does not need to initialize the assignment.

Reviewed and pushed to drm-misc-next.

Thanks,
Christian.

Quoted 17 lines
---
  include/drm/ttm/ttm_bo_driver.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/ttm/ttm_bo_driver.h +1 -1
index 897b88f0bd59..1afa891f488a 100644
@@ -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;