When you don't look at the return code you can't know if you actually got the
lock.

Signed-off-by: Rolf Eike Beer <e...@emlix.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h 
b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 3dc61cbd2e11..b6da8b561ae0 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -198,8 +198,8 @@ static inline int i915_gem_object_lock_interruptible(struct 
drm_i915_gem_object
        return __i915_gem_object_lock(obj, ww, true);
 }
 
-static inline bool i915_gem_object_trylock(struct drm_i915_gem_object *obj,
-                                          struct i915_gem_ww_ctx *ww)
+static inline bool __must_check i915_gem_object_trylock(struct 
drm_i915_gem_object *obj,
+                                                       struct i915_gem_ww_ctx 
*ww)
 {
        if (!ww)
                return dma_resv_trylock(obj->base.resv);
-- 
2.47.1


-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail i...@emlix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner


Reply via email to