Skip to contentSkip to conversation

drm/ttm: Fix missing return

PATCH In review Thomas Hellstrom 1 participant 2 messages Oct 1, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: Fix missing return

The commit "drm/ttm: Fix two race conditions"
was missing a return statement in a very unlikely code path.

---
 drivers/gpu/drm/ttm/ttm_bo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
index b98cb2c..d6000d7 100644
@@ -524,6 +524,7 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all)
 			atomic_set(&bo->reserved, 0);
 			wake_up_all(&bo->event_queue);
 			spin_unlock(&glob->lru_lock);
+			return 0;
 		}
 
 		put_count = ttm_bo_del_from_lru(bo);
Signature · 1 line
1.6.2.5
#1 lore raw

Hmm. Forget this patch! I must have been extremely tired today. A new one coming up in a moment.

/Thomas

Quoted 21 lines · Thomas Hellstrom

The commit "drm/ttm: Fix two race conditions"
was missing a return statement in a very unlikely code path.

---
  drivers/gpu/drm/ttm/ttm_bo.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
index b98cb2c..d6000d7 100644
@@ -524,6 +524,7 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all)
  			atomic_set(&bo->reserved, 0);
  			wake_up_all(&bo->event_queue);
  			spin_unlock(&glob->lru_lock);
+			return 0;
  		}
 
  		put_count = ttm_bo_del_from_lru(bo);