drm/ttm: fix warning that we shouldn't mix && and ||
authorChristian König <christian.koenig@amd.com>
Fri, 23 Jun 2023 07:08:00 +0000 (09:08 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 23 Jun 2023 15:21:02 +0000 (17:21 +0200)
Trivial warning fix.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 4481913607e5 ("drm/ttm: fix bulk_move corruption when adding a entry")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230623070935.65102-1-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_resource.c

index e51dbc7..46ff9c7 100644 (file)
@@ -114,7 +114,7 @@ static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk,
        struct ttm_lru_bulk_move_pos *pos = ttm_lru_bulk_move_pos(bulk, res);
 
        if (unlikely(WARN_ON(!pos->first || !pos->last) ||
-                    pos->first == res && pos->last == res)) {
+                    (pos->first == res && pos->last == res))) {
                pos->first = NULL;
                pos->last = NULL;
        } else if (pos->first == res) {