Skip to content

Commit d3faddc

Browse files
dinghaoliuBen Skeggs
authored andcommitted
drm/nouveau: fix runtime pm imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent d7372df commit d3faddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
159159
if (!WARN_ON(ret < 0 && ret != -EACCES)) {
160160
nouveau_gem_object_unmap(nvbo, vma);
161161
pm_runtime_mark_last_busy(dev);
162-
pm_runtime_put_autosuspend(dev);
163162
}
163+
pm_runtime_put_autosuspend(dev);
164164
}
165165
}
166166
ttm_bo_unreserve(&nvbo->bo);

0 commit comments

Comments
 (0)