Skip to content

Commit

Permalink
drm/amdgpu/pm: fix ref count leak when pm_runtime_get_sync fails
Browse files Browse the repository at this point in the history
[ Upstream commit 6642930 ]

The call to pm_runtime_get_sync increments the counter even in case of
failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
alexdeucher authored and gregkh committed Sep 3, 2020
1 parent 4e30283 commit 04cde70
Showing 1 changed file with 165 additions and 55 deletions.

0 comments on commit 04cde70

Please sign in to comment.